-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run simulation "TOKEN LIMIT EXCEEDED" error #141
Comments
Mine runs for a little while. I will re-run it in the next few days, and can show you how far mine gets. Seems less of an error, and maybe tied to OpenAI limits I may change. But glad to hear I am not the only one with the issue, because I thought there may have been something wrong with my code. |
I have the exact same issue |
I solved the problem. I will list the solution here and make a PR later (although author seems to be inactive nowadays to review PRs) The issue is simple, on Jan 4th 2024 OpenAI stopped all models with names such as "text-davinci-00x" (x=123). However, since model names are hard coded in Generative Agents all over the place instead of a single setup file, that means you need to search through the entire project for key word "davinci" and replace all of them to "gpt-3.5-turbo-instruct" (see: https://platform.openai.com/docs/deprecations) And also a note why this error is hard to spot is because original version assumed that the only error is from token out of bound (hard coded bounds); they did not expect models get replaced. I found this error by replacing the TRY-EXCEPT structure and print the exception message directly instead of printing a hard coded TOKEN LIMIT EXCEEDED msg. |
I have changed all the "text-davinci-00x" to "gpt-3.5-turbo-instruct", but still receive the TOKEN LIMIT EXCEEDED msg. |
I also have the same issue, but I did not use OpenAI's large language model. Instead, I use other LLM model that is compatible with the interface style of openai. So I replaced all model names and modified the corresponding base_url, but it still seemed easy to encounter this problem. And I updated the version of OpenAI's library and replaced the corresponding old version interfaces. |
|
I tried your method but it didnt work so i looked up the openai document. For people using gpt-3.5-turbo, they just need to change "GPT_request" in "gpt_structure.py", modify the parameter "prompt=prompt" to "messages=[{"role": "user", "content": prompt}]", and dont need to change "openai.Completion.create" to "openai.chat.completions.create". But still very thanks!!! |
I changed all "text-davinci-00x" in ""run_gpt_prompt.py"" to "gpt-3.5- turbo-instruct" solved the problem. |
I'm having the same problem... None of these steps worked...Anyone has more solutions? |
I installed it all correctly, everything seems to work, but when I try to run it, even with step count to 1,
it just prints "TOKEN LIMIT EXCEEDED". I'm not sure where the problem is, this OpenAI changes something that broke the code? I have a paid API with usage tier 3, so I think it was supposed to work, I tracked the API key the code is using but it seems that It's not even calling for the GPT3, it just makes calls for the "Text-embedding-ada-002-v2", if the OpenAI API tracking is accurate it didn't make any calls for the GPT API.
Anyone was able to run this recently? Anyone has any idea of what could e the cause of this error?
Edit: Also, it always ends in an error before asking to enter an option again:
The text was updated successfully, but these errors were encountered: