josephrocca / OpenCharacters

Simple little web interface for creating characters and chatting with them. It's basically a single HTML file - no server. Share characters using a link (character data is stored within the URL itself). All chat data is stored in your browser using IndexedDB. Currently supports OpenAI APIs and ~any Hugging Face model.
https://josephrocca.github.io/OpenCharacters
MIT License
364 stars 60 forks source link

Error when displaying summary using gpt-3.5-turbo-16k #54

Closed kickahaota closed 1 year ago

kickahaota commented 1 year ago

When I chat using the new gpt-3.5-turbo-16k model, the "/sum" command does not appear to work correctly as the conversation starts to grow. The "Please wait" message appears, but then an error dialog is displayed with the following message:

sendButtonClickHandler error: Error: The specified values of `maxTokenCountOfSummary` and `messageTokensToConsumePerSummary` are such that the summarization process could go over this model's token limit.
at computeAndSaveThreadSummaryIfNeeded (https://josephrocca.github.io/OpenCharacters/:3511:19)
at async HTMLButtonElement.sendButtonClickHandler (https://josephrocca.github.io/OpenCharacters/:6291:65)

The tab then hangs until refreshed.

I don't have any way of debugging this here; but maybe this model choice code from line 3482 is no longer accurate? Maybe you need to use the gpt-3.5-turbo-16k model to summarize gpt-3.5-turbo-16k chats?

if(await threadIsUsingOpenAiModel(thread)) {
            modelName = "gpt-3.5-turbo"; // if they're using any OpenAI model, then we use turbo for summarization
}
kickahaota commented 1 year ago

It now shows up in the "model" menu at the top left of the OpenCharacters page for me: "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "text-davinci-003", and "gpt-4", in that order.

This model appears to have just been released. See https://openai.com/blog/function-calling-and-other-api-updates .

image

On Tue, 13 Jun 2023 at 23:34, Bobolx00 @.***> wrote:

Where you put the "gpt-3.5-turbo-16k" model name to use it im the chat?

— Reply to this email directly, view it on GitHub https://github.com/josephrocca/OpenCharacters/issues/54#issuecomment-1590559229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMAOGY5P6YNO6LVYRQZVQTXLFLORANCNFSM6AAAAAAZFZ6MNM . You are receiving this because you authored the thread.Message ID: @.***>

josephrocca commented 1 year ago

Thanks! I think this is fixed now - please ping me if you're still running into problems