Many people have complained that GPT-3 is trained on historical data, gives inaccurate information or fails to cite its sources. This script shows how GPT-3 combined with a web search resolves these issues.
This free Google Sheets script lets you generate AI-generated responses to search queries on current information with cited sources.
Get the latest news on any company, person, or topic.
Generate biographies for staff, speakers, or podcast guests.
Get the latest financial data on any company or fund.
Extract pricing data for any product or service.
Extract information from any URL.
The possibilities are endless!
The source data powering these searches is provided by You.com. As with all search engines, results are cached and may not always include the most current information available on the web. Be mindful of this and test rigorously if you are planning to use this script for critical, time-sensitive data retrieval.
1) Register an account with RapidAPI.com and subscribe to the YouChat GPT API.
While you will receive 500 requests per month on RapidAPI’s free plan, the number of consecutive API requests you can make is quite limited. I suggest using the free plan for testing and then sign up for a ‘Pro’ account ($10 pm) for extended use.
A Pro account on RapidAPI includes 5,000 requests per month at a maximum rate of one request per second. This works out at $0.002 per request once you have used up free credits.
1) Download a copy of my free Google Sheet and script.
You will see two tabs named, ‘Queries’ and ‘Settings’.
2) Enter your RapidAPI API Key in cell A2 of the “Settings” sheet as instructed.
3) Enter a search query in column A of the ‘Queries’ sheet.
4) If you need more rows, add the function =getAnswer(A[X]) to column B of the ‘Queries’ sheet.
You may need to grant permission for the script to run and confirm that the script is safe.
Do take a look at the code behind this function by clicking Extensions > Apps Script from the main menu and feel free to adapt it to different use cases.
Although I can’t offer individual support for this free script, please let me know if you run into any bugs or have thoughts on how the script could be adapted.
Check out this list of other GPT-3 scripts I have released and feel free to follow me on Twitter to hear about new releases.