The search failed and the error message should say something about my not having the proper API key.
Describe the issue
Code in the script:
const parkinfo = await retrieval.webSearch("mt rainier things to do")
def("PARKINFO", parkinfo.webPages[0])
To Reproduce
Create a script with no other inputs and run it.
Expected behavior
Expected it to retrieve web pages, instead error message:
💾 script
🧬 prompt
📓 script source
model: gpt-4
temperature: 0.2
max tokens: 4000
🌐 retrieval web search mt rainier things to do
❌ web search error
{}
Environment
vscode: 1.87.2
extension: 1.19.1
Request
## plan-weekend
<details id="🤖-automation" class="genaiscript">
<summary>
🤖 automation
</summary>
This operation can be automated using the command line interface.
- to run on all files at once, use the `run` command:
```bash
npx --yes genaiscript@^1.19.1 run plan-weekend "genaisrc/plan-weekend.genai.js" --apply-edits
to run a LLM generation on each file, use the batch command:
Run npx genaiscript help run for the full list of options.
📄 spec
```markdown
# Specification
```
💾 script
🧬 prompt
📓 script source
```js
script({
title: "plan-weekend",
description: "Given details about my goals, help plan my weekend",
group: "recreational",
model: "gpt-4",
maxTokens: 4000,
})
const parkinfo = await retrieval.webSearch("mt rainier things to do")
def("PARKINFO", parkinfo.webPages[0])
const weather = await retrieval.webSearch("mt rainier weather")
def("WEATHER", weather.webPages)
const outputName = path.join(path.dirname(env.spec.filename), "trip-plan.md")
// use $ to output formatted text to the prompt
$`You are a helpful assistant that is an expert in planning weekend trips.
I've included information about my destination in PARKINFO and WEATHER.
Help me plan a weekend trip starting tomorrow.
Write the result to a markdown file at ${outputName}.
`
```
- model: gpt-4
- temperature: 0.2
- max tokens: 4000
🌐 retrieval web search `mt rainier things to do`
### ❌ web search error
```yaml
{}
```
### ❌ at prompt line 11, column 26
```yaml
{}
```
Type: Documentation
The search failed and the error message should say something about my not having the proper API key.
Describe the issue
Code in the script:
To Reproduce
Create a script with no other inputs and run it.
Expected behavior
Expected it to retrieve web pages, instead error message: 💾 script 🧬 prompt 📓 script source model: gpt-4 temperature: 0.2 max tokens: 4000 🌐 retrieval web search
mt rainier things to do
❌ web search error {}Environment
vscode: 1.87.2 extension: 1.19.1
Request
batch
command:.env
file.npx genaiscript help run
for the full list of options.📄 spec
```markdown # Specification ```💾 script
🧬 prompt
📓 script source
```js script({ title: "plan-weekend", description: "Given details about my goals, help plan my weekend", group: "recreational", model: "gpt-4", maxTokens: 4000, }) const parkinfo = await retrieval.webSearch("mt rainier things to do") def("PARKINFO", parkinfo.webPages[0]) const weather = await retrieval.webSearch("mt rainier weather") def("WEATHER", weather.webPages) const outputName = path.join(path.dirname(env.spec.filename), "trip-plan.md") // use $ to output formatted text to the prompt $`You are a helpful assistant that is an expert in planning weekend trips. I've included information about my destination in PARKINFO and WEATHER. Help me plan a weekend trip starting tomorrow. Write the result to a markdown file at ${outputName}. ` ```🌐 retrieval web search `mt rainier things to do`
### ❌ web search error ```yaml {} ```vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 7ghi1836:30988842 dsvsc021:30996838 gd77d436:30999572