Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
MIT License
166.09k stars 43.97k forks source link

browse_website fails, Error: Expecting value: line 1 column 1 (char 0) #2282

Closed rickhardslab closed 11 months ago

rickhardslab commented 1 year ago

⚠️ Search for existing issues first ⚠️

GPT-3 or GPT-4

Steps to reproduce 🕹

When choosing a prompt which will involve AutoGPT to browse the internet, it fails to return the results with an error.

Name: Test1
Description: Test1
Goal1: Provision a Gmail account
Goal2: Once a gmail account is provisioned, output the credentials to output.txt
Goal3: Once a gmail account is provisioned, send a test email to [insert valid email address]
Goal4: Wait for a reply from [valid email address] to confirm the test email was delivered successfully

y -20

Every test I've performed resulted in AutoGPT to choose the browse_website command.

Current behavior 😯

AutoGPT will choose to use the browse_website command, but fails to return results:

Using memory of type:  LocalCache
Using Browser:  chrome
 THOUGHTS:  I need to provision a gmail mailbox and send a test email to [Valid Email]. I can use the Google Cloud Platform to create a new project and enable the Gmail API. Then, I can create credentials for the project and use them to authenticate requests to the Gmail API. I will need to use the 'google' command to search for instructions on how to do this.
REASONING:  I need to use the Google Cloud Platform to create a new project and enable the Gmail API. Then, I can create credentials for the project and use them to authenticate requests to the Gmail API.
PLAN:
-  Use the 'google' command to search for instructions on how to create a new project and enable the Gmail API on the Google Cloud Platform
-  Follow the instructions to create a new project and enable the Gmail API
-  Create credentials for the project and use them to authenticate requests to the Gmail API
-  Use the credentials to provision a new Gmail mailbox
-  Send a test email to [Valid Email]
-  Wait for a reply from [Valid Email] to confirm the test email was delivered successfully
CRITICISM:  I need to be careful to follow the instructions correctly and ensure that the test email is delivered successfully.
SPEAK:  I will use the Google Cloud Platform to create a new project and enable the Gmail API. Then, I will create credentials for the project and use them to provision a new Gmail mailbox and send a test email to [Valid Email].
Attempting to fix JSON by finding outermost brackets
Apparently json was fixed.
NEXT ACTION:  COMMAND = google ARGUMENTS = {'input': 'how to create a new project and enable the Gmail API on the Google Cloud Platform'}
Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for ...
Input:y -15
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=
SYSTEM:  Command google returned: ['https://cloud.google.com/endpoints/docs/openapi/enable-api', 'https://developers.google.com/workspace/guides/create-project', 'https://support.google.com/googleapi/answer/6158841?hl=en', 'https://developers.google.com/workspace/guides/enable-apis', 'https://support.google.com/googleapi/answer/6158862?hl=en', 'https://help.bittitan.com/hc/en-us/articles/360049370794-G-Suite-Gmail-API-to-Exchange-Online-Microsoft-365-Migration-Guide', 'https://support.google.com/cloud/answer/9110914?hl=en', 'https://help.bittitan.com/hc/en-us/articles/360049044053-G-Suite-Gmail-API-to-G-Suite-Gmail-API-Migration-Guide']
 THOUGHTS:  I found several links that explain how to create a new project and enable the Gmail API on the Google Cloud Platform. I will browse through them to find the most relevant one.
REASONING:  I need to find the most relevant link that explains how to create a new project and enable the Gmail API on the Google Cloud Platform.
PLAN:
-  Use the 'browse_website' command to browse through the links returned by the 'google' command
-  Look for the most relevant link that explains how to create a new project and enable the Gmail API on the Google Cloud Platform
-  Follow the instructions to create a new project and enable the Gmail API
-  Create credentials for the project and use them to authenticate requests to the Gmail API
-  Use the credentials to provision a new Gmail mailbox
-  Send a test email to [Valid Email]
-  Wait for a reply from [Valid Email] to confirm the test email was delivered successfully
CRITICISM:  I need to be careful to follow the instructions correctly and ensure that the test email is delivered successfully.
SPEAK:  I will browse through the links returned by the 'google' command to find the most relevant one that explains how to create a new project and enable the Gmail API on the Google Cloud Platform.
Attempting to fix JSON by finding outermost brackets
Apparently json was fixed.
NEXT ACTION:  COMMAND = browse_website ARGUMENTS = {'url': 'https://developers.google.com/workspace/guides/create-project', 'question': 'how to create a new project and enable the Gmail API on the Google Cloud Platform'}
SYSTEM:  Command browse_website returned: Error: Expecting value: line 1 column 1 (char 0)
 THOUGHTS:  There seems to be an issue with the 'browse_website' command. I will try using the 'google' command again to find a different link that explains how to create a new project and enable the Gmail API on the Google Cloud Platform.
REASONING:  The 'browse_website' command did not work, so I need to find a different link that explains how to create a new project and enable the Gmail API on the Google Cloud Platform.
PLAN:
-  Use the 'google' command to search for instructions on how to create a new project and enable the Gmail API on the Google Cloud Platform
-  Look for a relevant link that explains how to create a new project and enable the Gmail API on the Google Cloud Platform
-  Follow the instructions to create a new project and enable the Gmail API
-  Create credentials for the project and use them to authenticate requests to the Gmail API
-  Use the credentials to provision a new Gmail mailbox
-  Send a test email to [Valid Email]
-  Wait for a reply from [Valid Email] to confirm the test email was delivered successfully
CRITICISM:  I need to be careful to follow the instructions correctly and ensure that the test email is delivered successfully.
SPEAK:  I will use the 'google' command again to find a different link that explains how to create a new project and enable the Gmail API on the Google Cloud Platform.
Attempting to fix JSON by finding outermost brackets

Note the latter SYSTEM: output stating the failure. If allowed to execute, AutoGPT will choose to google again, attempt to open the most relevant results, and fail with the same error and code 100% of the time.

Expected behavior 🤔

When AutoGPT chooses to use browse_website, it should return usable results without error.

Your prompt 📝

last_run_ai_settings.yaml does not exist within my AutoGPT directory even after running the above tests. Prompt details included in the 'reproduce' section.

ntindle commented 1 year ago

Are you running a proxy?

rickhardslab commented 1 year ago

Are you running a proxy?

No proxy, however worth noting this is my first deployment and I've never had it working, it's possible I've failed to set it up properly somehow.

I did set up my google and OpenAI APIs, both paid. The actual googling seems to work, it's only after it decides to summarize the website does it fail to get any results.

rickhardslab commented 1 year ago

Note, ran python -m unittest discover tests and got:

.........json I will first need to browse the repository (https://github.com/Torantulino/Auto-GPT) and identify any potential bugs that need fixing. I will use the "browse_website" command for this.

{
    "command": {
        "name": "browse_website",
        "args":{
            "url": "https://github.com/Torantulino/Auto-GPT"
        }
    },
    "thoughts":
    {
        "text": "Browsing the repository to identify potential bugs",
        "reasoning": "Before fixing bugs, I need to identify what needs fixing. I will use the 'browse_website' command to analyze the repository.",
        "plan": "- Analyze the repository for potential bugs and areas of improvement",
        "criticism": "I need to ensure I am thorough and pay attention to detail while browsing the repository.",
        "speak": "I am browsing the repository to identify potential bugs."
    }
}
json loads error Expecting value: line 1 column 1 (char 0)
.json BEGIN: "name": "John" - "age": 30 - "city": "New York" :END
json loads error Expecting value: line 1 column 1 (char 0)
.json BEGIN: "name": "John" - "age": 30 - "city": "New York" :END
json loads error Expecting value: line 1 column 1 (char 0)
.json {"name": "John", "age": 30, "city": "New York",}
json loads error Expecting property name enclosed in double quotes: line 1 column 48 (char 47)
.......... ←[0m Warning: model not found. Using cl100k_base encoding.
.....
----------------------------------------------------------------------
Ran 27 tests in 0.216s

OK

The version of AutoGPT I configured was the stable branch downloaded on 4/16/23 @ 8:30pm EST. If someone can point me to a version lookup I can provide that instead.

github-actions[bot] commented 11 months ago

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

github-actions[bot] commented 11 months ago

This issue was closed automatically because it has been stale for 10 days with no activity.