AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

how to reduce prompt?

Open luoshu999 opened this issue 2 years ago • 4 comments

Command browse_website returned: Error: This model's maximum context length is 8191 tokens, however you requested 12227 tokens (12227 in your prompt; 0 for the completion). Please reduce your prompt; or completion length?

luoshu999 avatar Apr 19 '23 00:04 luoshu999

Hi! what is you environments configuration? Have you set up a .env? If so, what is your token limit configured for?

Notarin avatar Apr 19 '23 05:04 Notarin

I have the same issue... openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, you requested 39997 tokens (964 in the messages, 39033 in the completion). Please reduce the length of the messages or completion. Press any key to continue... I actually played around with these two parameters in the .env file but increasing them doesn't work as the limitation comes from the model. FAST_TOKEN_LIMIT=4000 SMART_TOKEN_LIMIT=8000

I tried to make auto-gpt change the code of a cloned version of hisself and also directly improve his code but it always fail by not having such an error like luoshu999

TheGreenMonkeys avatar Apr 19 '23 07:04 TheGreenMonkeys

NEXT ACTION: COMMAND = search_files ARGUMENTS = {'directory': '/home/123/Auto-GPT/auto_gpt_workspace/code'}

openai.error.InvalidRequestError: This model's maximum context length is 8191 tokens, however you requested 157096 tokens (157096 in your prompt; 0 for the completion). Please reduce your prompt; or completion length

ubuntu 20.04 on lastest master

timlincool avatar Apr 19 '23 12:04 timlincool

same here openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, you requested 13997 tokens (1355 in the messages, 12642 in the completion). Please reduce the length of the messages or completion.

Jpsanchezasmalljob avatar Apr 20 '23 14:04 Jpsanchezasmalljob

same here

Jens-AIMLX avatar Apr 21 '23 03:04 Jens-AIMLX

This has been resolved for browse_website with #2542. search_files is still broken, and tracked here:

  • #2801

Pwuts avatar Apr 22 '23 13:04 Pwuts