chatgpt-google-summary-extension icon indicating copy to clipboard operation
chatgpt-google-summary-extension copied to clipboard

Context length overruns when summarizing long videos

Open ding113 opened this issue 2 years ago • 2 comments
trafficstars

When attempting to summarize a longer YouTube video using the plugin, I found that regardless of whether I used the brief summary mode or full text summary mode, the program's output exceeded 8k tokens. This caused the API to be unable to return results. As the current price for a 16k model is too high, it would be beneficial if optimization processing could be implemented to truncate long video summaries and adapt them to an 8k token model.

I am unsure if this issue is a bug in the test version as summarization works normally when using the store version. However, while using the store version, I encountered an issue where customizing OpenAI host URL did not work for YouTube Q&A videos. This problem has been resolved in the test version.

The complete error message reads:

{"error":{"message":"This model's maximum context length is 8192 tokens. However, your messages resulted in 14383 tokens. Please reduce the length of the messages.","type":"invalid_request_error","param":"messages","code":"context_length_exceeded"}}

  • OS: macOS
  • Browser Chrome
  • Version 2.6.1

ding113 avatar Jul 12 '23 16:07 ding113

Try v2.6.3

givebest avatar Jul 13 '23 11:07 givebest

After testing the new version, it was discovered that the plugin should have utilized openai's API 16k model. However, I did not intend to use this model.

To my recollection, the default token for gpt-turbo-3.5 model is 4k. It is unclear why the error returned above indicates 8k.

In reality, since I am using an Azure OpenAI reverse proxy openai API without deploying a 16k model, when processing models with 16k tokens, they can only be mapped to a 4k model. Therefore, the issue still persists.

Nonetheless, not having access to a 16k model may be a personal problem and encountering this situation may be rare. My apologies for any inconvenience caused. If you believe this matter does not require further attention, please consider closing it.

ding113 avatar Jul 13 '23 15:07 ding113