AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Stuck in a loop of: System: Command browse_website returned: Error: 'question'

Open marinohardin opened this issue 1 year ago • 2 comments

⚠️ Search for existing issues first ⚠️

  • [X] I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Windows

Which version of Auto-GPT are you using?

Latest Release

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

I have been in a loop of the AI repeatedly attempting to scan the same website and getting the error System: Command browse_website returned: Error: 'question'

I have no idea how to troubleshoot this. It was working great for a while. I am on the current stable branch.

Current behavior 😯

----------- END OF FIX ATTEMPT ----------------
The JSON object is valid.
THOUGHTS:  I will browse the website https://XXXXX.html l to see if there is any information on XXXX. I will also use the 'search_files' command to look for files on the internet that contain information on XXXX.
REASONING:  Browsing the website and searching for files on the internet will help me gather information on XXXX.
PLAN:
-  Use 'browse_website' command to search for information on XXXX on https://XXXX.html
-  Use 'search_files' command to look for files on the internet that contain information on XXXX.
CRITICISM:  I should make sure to check the credibility of the sources I find information on.
NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://XXXX.html', 'search_term': 'XXXX'}
SYSTEM:  Command browse_website returned: Error: 'question'
 Token limit: 4000
 Memory Stats: (181, (181, 1536))
 Token limit: 4000
 Send Token Count: 2967
 Tokens remaining for response: 1033
 ------------ CONTEXT SENT TO AI ---------------
 System: The current time and date is Fri Apr 21 12:16:14 2023

 System: This reminds you of these events from your past:
['Assistant Reply: {\n    "thoughts": {\n        "text": "I will use the \'browse_website\' command to visit each of the websites returned by the \'google\' command and look for information on XXXX. I will also use the \'search_files\' command to see if there are any files on the internet that contain information on XXXX.",\n        "reasoning": "Visiting the websites returned by the \'google\' command is likely to yield information on XXXX. Additionally, using the \'search_files\' command to look for files on the internet that contain information on XXXX may yield useful information.",\n        "plan": "- Use the \'browse_website\' command to visit each of the websites returned by the \'google\' command.\\\\\\\\\\\\\\\\n- Look for information on XXXX.\\\\\\\\\\\\\\\\n- Use the \'search_files\' command to look for files on the internet that contain information on XXXX.\\\\\\\\\\\\\\\\n- Store any useful information in a markdown document.",\n        "criticism": "I need to be careful not to mix up information on XXXX with YYYY.",\n        "speak": "I will use the \'browse_website\' command to visit each of the websites returned by the \'google\' command and look for information on XXXX. I will also use the \'search_files\' command to see if there are any files on the internet that contain information on XXXX."\n    },\n    "command": {\n        "name": "browse_website",\n        "args": {\n            "url": "https://XXXX",\n            "question": "What information is available on XXXX?"\n        }\n    }\n} \nResult: Command browse_website returned: 

{I redacted a little here}

Result: Command browse_website returned: ("Answer gathered from website: XXXX. \\n \\n Links:XXXX\', \'Translate (https://translate.google.com)\', \'Home (https://XXXX/)\', \'About Us (http://XXXX\', \'XXXX, <selenium.webdriver.chrome.webdriver.WebDriver (session="e7310f0b3e46c3390c24791524ec1550")>) \nHuman Feedback: GENERATE NEXT COMMAND JSON ']



 System: Command browse_website returned: Error: 'question'

 User: Determine which next command to use, and respond using the format specified above:

 Assistant: I will use the 'browse_website' command to browse the website https://XXXX to see if there is any information on XXXX. I will also use the 'search_files' command to look for files on the internet that contain information on XXXX.

 System: Command browse_website returned: Error: 'question'

 User: Determine which next command to use, and respond using the format specified above:

 Assistant: I will use the 'browse_website' command to browse the website https://XXXX to see if there is any information on XXXX. I will also use the 'search_files' command to look for files on the internet that contain information on XXXX.

 System: Command browse_website returned: Error: 'question'
 Thinking...
 User: Determine which next command to use, and respond using the format specified above:

 Assistant: I will use the 'browse_website' command to browse the website https://XXXX to see if there is any information on XXXX. I will also use the 'search_files' command to look for files on the internet that contain information on XXXX.

 System: Command browse_website returned: Error: 'question'

 User: Determine which next command to use, and respond using the format specified above:

 Assistant: I will use the 'browse_website' command to browse the website https://XXXX to see if there is any information on XXXX. I will also use the 'search_files' command to look for files on the internet that contain information on XXXX.

 System: Command browse_website returned: Error: 'question'

 User: Determine which next command to use, and respond using the format specified above:

 Assistant: I will use the 'browse_website' command to browse the website https://XXXX to see if there is any information on XXXX. I will also use the 'search_files' command to look for files on the internet that contain information on XXXX.

 System: Command browse_website returned: Error: 'question'

 User: Determine which next command to use, and respond using the format specified above:

 ----------- END OF CONTEXT ----------------

Creating chat completion with model gpt-3.5-turbo, temperature 0.0, max_tokens 1033
json I will use the 'browse_website' command to browse the website https://www.themichaeltrust.com/2021/05/jehovahs-witnesses-robert-hendricks.html to see if there is any information on Robert Hendricks. I will also use the 'search_files' command to look for files on the internet that contain information on Robert Hendricks.
json loads error Expecting value: line 1 column 1 (char 0)
 Warning: Failed to parse AI output, attempting to fix.
If you see this warning frequently, it's likely that your prompt is confusing the AI. Try changing it up slightly.
Creating chat completion with model gpt-3.5-turbo, temperature 0, max_tokens None

Expected behavior 🤔

It should be able to download from the website and read it.

Your prompt 📝

# Paste your prompt here

Your Logs 📒

<insert your logs here>

marinohardin avatar Apr 21 '23 19:04 marinohardin

Can you paste your prompt? I can't seem to find it in your post. I would like to test this on my environment.

dmkilday avatar Apr 21 '23 22:04 dmkilday

Running into the same infinite loop issue here as well... hmmm...

Supplementary info:

  • I have a paid account setup so that doesn't seem to be the issue, even though that error is not disappearing
THOUGHTS:  Looking for information about xxxxx.
REASONING:  To determine xxxxx to achieve xxxxx.
PLAN:
-  Browse the website and gather information about xxxxx.
-  Analyze the data to determine xxxxx.
CRITICISM:
NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://www.xxxxx'}
SYSTEM:  Command browse_website returned: Error: 'question'
https://github.com/Significant-Gravitas/Auto-GPT#openai-api-keys-configuration
DOUBLE CHECK CONFIGURATION  Please double check that you have setup a PAID OpenAI API Account. You can read more here: https://github.com/Significant-Gravitas/Auto-GPT#openai-api-keys-configuration
Error: The following AI output couldn't be converted to a JSON:
  I apologize for the repeated error. I will use the browse_website command to browse the website https://xxxxx. I will xxxxx. After completing this, I will also xxxxx.
NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://www.xxxxx'}
SYSTEM:  Command browse_website returned: Error: 'question'
DOUBLE CHECK CONFIGURATION  Please double check that you have setup a PAID OpenAI API Account. You can read more here: https://github.com/Significant-Gravitas/Auto-GPT#openai-api-keys-configuration
Error: The following AI output couldn't be converted to a JSON:
  I apologize for the repeated error. I will use the browse_website command to browse the website https://xxxxx. I will xxxxx. After completing this, I will also xxxxx.
NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://www.xxxxx'}
SYSTEM:  Command browse_website returned: Error: 'question'
DOUBLE CHECK CONFIGURATION  Please double check that you have setup a PAID OpenAI API Account. You can read more here: https://github.com/Significant-Gravitas/Auto-GPT#openai-api-keys-configuration
Error: The following AI output couldn't be converted to a JSON:
  I apologize for the repeated error. I will use the browse_website command to browse the website https://xxxxx. I will xxxxx. After completing this, I will also xxxxx.
NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://www.xxxxx'}
SYSTEM:  Command browse_website returned: Error: 'question'
DOUBLE CHECK CONFIGURATION  Please double check that you have setup a PAID OpenAI API Account. You can read more here: https://github.com/Significant-Gravitas/Auto-GPT#openai-api-keys-configuration

... infinite loop

...

InJJWeTrust avatar Apr 22 '23 09:04 InJJWeTrust

Seems to be a prompt issue. Work with the people in #prompt-engineering on discord to get a more suitable prompt

ntindle avatar Apr 23 '23 02:04 ntindle