New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context too Large #45
Comments
Thanks for reporting an issue!
This is strange. The conversation ID is changed on my phone as the message history is removed from GUI.
As you mentioned, there should be a way to keep request token limited and clear messages. There should be experiments done for computing request token size which would take some time. Although it would take some time to get it done, this is the feature that the component should support. |
I think there need to be 2 separate solutions, One for a conversation with a too large token size, then a shorter message needs to be compiled to GPT The other is to add an option to clear messages. This to prevent previous context on new queries, but also save money. |
And Hi @jekalmin I am really enjoying your work! |
I just released 1.0.2-beta2. At first, I only added clearing message feature. |
Hello,
Thank you for creating this integration. It has been a very awesome integration into my smart home.
However, I am experiencing an issue where the request to openai exceeds my usage limits per request of 10,000 tokens. I know that my limits will go up the longer I use OpenAI's api, but I think it would be a nice feature to either:
Be able to limit the size of the Messages object sent in a request (currently, mine is almost 4000 tokens in size, which locks me out after a few requests). Perhaps by limiting the number of messages permitted to exist in the history.
Have a way to clear that messages object manually when this occurs.
I am not sure how home assistant tracks the conversation_id that determines if the message history is inserted into the messages object, but my experience is as follows:
Closing the voice assistant on a mobile device does not change the conversation ID in the eyes of your python program, however, it does remove the message history from the GUI. Yet, when I make a new request, I see that the messages object is still almost 4000 tokens.
Thanks again for leading the development on this integration.
The text was updated successfully, but these errors were encountered: