Replies: 1 comment 5 replies
-
So you are limited by token counts. Here are 2 ideas to consider: Increasing the Token CountUsing a 16k or 32k context model (If you have beta access to it... you need to apply for the 32k context I believe). Note that using these models is much more expensive. Segmenting the workIn 1 Then you can either append these summaries together or use another ChatRequest to smoothly combine these summaries. Choosing another AII hate to recommend this at all, but OpenAI isn't really built for long context windows. They're larger context models are much more expensive and are still too small for certain tasks. If you are willing to build your own API, some models exist online that can handle large amounts of text and are good at summaries (I believe there are models that are used summarize entire books). |
Beta Was this translation helpful? Give feedback.
-
I'm writing a Discord bot meant to summarize the last n messages. The idea is that large group chats often accumulate hundreds of unread messages while someone else is offline and it's a pain to read it all back by hand.
Now, so far I got it set up to summarize the last like 200 messages just fine. However, after that I get an error message because my prompt used too many tokens (more than 4096).
What's the approach to passing larger prompts (like 1000 messages)?
I tried splitting the messages into partitions of 200 each, which sorta works, but GPT treats each partition individually rather than part of a bigger picture and it doesn't keep context.
Beta Was this translation helpful? Give feedback.
All reactions