Closed
Description
gptscript version - v0.0.0-dev-656ae77b-dirty
Steps to reproduce the problem:
- Execute the following script that have tools from
github.com/gptscript-ai/search/google
% cat google_search.gpt
tools: github.com/gptscript-ai/search/google, sys.http.html2text?
You are an expert web researcher with access to the Google Search API.
What are some low-calorie, keto-friendly lunch recipes? How about dinner recipes? How many calories are in each one?
- I see duplicate prompts and also see some information already prefilled as well and the script never exits.
gptscript --disable-cache google_search.gpt
12:06:08 started [main]
12:06:08 sent [main]
content [1] content | Waiting for model response...
content [1] content | tool call google -> {"q": "low-calorie keto-friendly lunch recipes", "search_lang": "en"}
content [1] content | tool call google -> {"q": "low-calorie keto-friendly dinner recipes", "search_lang": "en"}
12:06:10 started [credential: github.com/gptscript-ai/search/google-credential]
12:06:10 started [credential: github.com/gptscript-ai/search/google-credential]
12:06:10 sent [credential: github.com/gptscript-ai/search/google-credential]
12:06:10 sent [credential: github.com/gptscript-ai/search/google-credential]
Please enter your Google Search API token and engine ID.
Please enter your Google Search API token and engine ID.
?
? token *
12:06:29 ended [credential: github.com/gptscript-ai/search/google-credential]
12:06:29 started [https://raw.githubusercontent.com/gptscript-ai/search/2033a6badc431f1b35116beaad29f5d707651f43/google/tool.gpt(4)] [input={"q": "low-calorie keto-friendly dinner recipes", "search_lang": "en"}]
12:06:29 sent [https://raw.githubusercontent.com/gptscript-ai/search/2033a6badc431f1b35116beaad29f5d707651f43/google/tool.gpt(4)]
time="2024-04-15T12:06:29-07:00" level=error msg="GPTSCRIPT_GOOGLE_SEARCH_TOKEN is not set"
12:06:29 failed to run tool [] cmd [/Users/sangeethahariharan/Library/Caches/gptscript/repos/2033a6badc431f1b35116beaad29f5d707651f43/go1.22.1/google/bin/gptscript-go-tool {"q": "low-calorie keto-friendly dinner recipes", "search_lang": "en"}]: exit status 1
Expected Behavior:
Should be prompted for credentials properly and the script execution should succeed.