Remove UserInput
The maximum number of tokens in GPT3.5 is 4096, so after multiple calls to AppendUserInput, it may exceed 4096. How can I remove early input and corresponding Assistant?
I would also like to implement this.
I’m working on a way to fix this, hope to have it landed this week. Thanks for your patience!
I am facing this problem too. Please fix this. I also can't remove messages from Chat Request through my codes to create a workaround. Messages inside ChatRequest is a readonly list.
I found me a temporary solution.
When the number of conversation messages is greater than x I create a new conversation and append the last x number of messages from the previous conversation.
If I then set MaxTokens for the completion to a number which multiplied with the number of messages I am keeping in history is lower than the token limit, it is hopefully all right.
Its probably not the most optimal solution but I think it works. Good enough for me at least, until a better solution is provided.
Great library by the way. 👍 Good work.