I would like to ask you a technical question: The maximum limit of tokens in openAi's official interface is 4096. I want to use the contextual dialogue function, but it easily exceeds the limit of tokens. How should I handle it better #322
eamd-wq
started this conversation in
Discussions
Replies: 1 comment
-
Well...leverage whatever language you are using to trim your input to the limit. Ask any of the AIs to help you and they'll straight up write the code for you! The more specific you are, the better the code is. I use javascript. Here's what they gave me: 'This function callAPI takes in the new input as a string, adds it to the buffer, and then concatenates as many previous inputs from the buffer as possible while staying within the token limit. It then sends the concatenated string to the API and removes the processed inputs from the buffer.'
Hope that's helpful! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to ask you a technical question: The maximum limit of tokens in openAi's official interface is 4096. I want to use the contextual dialogue function, but it easily exceeds the limit of tokens. How should I handle it better
Beta Was this translation helpful? Give feedback.
All reactions