AutoGPT
AutoGPT copied to clipboard
Full Google search results (knowledge graph, featured snippets, etc.) using Serper.dev API.
Support for full Google search results (knowledge graph, featured snippets, etc.) using the serper.dev Google Search API.
Background
This feature enables the agent to leverage the Google knowledge graph, featured snippets, and information on 'related searches'. It uses the Serper API, a low-cost Google Search API that performs searches on google.com directly. The search results are much more accurate than the search results from the official Google Custom Search JSON API.
Changes
Added the optional google_serper_search command that automatically gets enabled when there is a SERPER_API_KEY .
Documentation
If you wish to use the full search results from google.com, you can use the google_serper_search command.
This feature enables the agent to leverage the Google knowledge graph, featured snippets, and information on 'related searches'.
To use this command, you'll need to set up your Serper API keys in the environment variables.
- Go to serper.dev.
- Sign up for a free account (you get 1k free credits)
- Go to the API key page and copy the API key.
- Set the
SERPER_API_KEYenvironment variable to the key you copied.
For Windows Users:
setx SERPER_API_KEY "YOUR_SERPER_API_KEY"
For macOS and Linux users:
export SERPER_API_KEY="YOUR_SERPER_API_KEY"
Test Plan
Setting the SERPER_API_KEY automatically enables full Google search using the Serper.dev API. No automatic tests are included to not publicly expose private keys.
PR Quality Checklist
- [x] My pull request is atomic and focuses on a single change.
- [x] I have thoroughly tested my changes with multiple different prompts.
- [x] I have considered potential risks and mitigations for my changes.
- [x] I have documented my changes clearly and comprehensively.
- [x] I have not snuck in any "extra" small tweaks changes
This seems like a great addition, but I believe you should create a plugin instead of pushing to the main repository. I don't think this will get merged.
Please check this repository for the plugin template: https://github.com/Significant-Gravitas/Auto-GPT-Plugin-Template and the Plugins repository here: https://github.com/Significant-Gravitas/Auto-GPT-Plugins
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Hello!
We sincerely appreciate your contribution to our project. Please note that only essential features will be merged into the main repository. Thus, we encourage you to open a pull request in the Auto-GPT-Plugins repository.
If you encounter any difficulties in converting your code into a plugin, please do not hesitate to seek assistance from the #plugins-chat on our Discord Server.
We look forward to your contribution to the Plugins repository, and we apologize for any inconvenience this may have caused.