Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Add basic commands to reset the history #22

Open
PaulWoitaschek opened this issue Jul 15, 2023 · 1 comment
Open

Add basic commands to reset the history #22

PaulWoitaschek opened this issue Jul 15, 2023 · 1 comment

Comments

@PaulWoitaschek
Copy link
Contributor

Currently, - if I understand correctly - the whole history of messages gets transmitted for the chat completions.
This is problematic because sometimes the context changes:
You might first ask the chat bot for a recipe on how to make a good paella. And then at a later point want to know about the pros and cons of an FSME vaccination.

It would be great if we had the option to reset the history. This could for instance be done with a command like:
!new

That would also have the additional benefit of lowering the costs as there are less tokens (unnecessarily) transmitted.

@cycneuramus
Copy link
Owner

For the OpenAI API, the transmitted history is actually limited to 5 messages (see the max_history param). Hard-coding the value like this is obviously not the best idea, but at least the API costs will be kept somewhat in check.

Fixing this, and making it possible to reset the history, is a good idea, but I am unfortunately pressed for time to keep up with this project ATM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants