josephrocca/OpenCharacters

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

kickahaota opened this issue · 2 comments

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
}

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