Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime error: index out of range error encountered sometimes when using sys.http.html2text #324

Open
sangee2004 opened this issue May 7, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sangee2004
Copy link
Contributor

sangee2004 commented May 7, 2024

Steps to reproduce the problem:

  1. Execute gptscript that uses sys.http.html2text along with search tool.
cat test_search_context.gpt
context: search_context from test_context.gpt with duckduckgo as search_tool
tools: github.com/gptscript-ai/search/duckduckgo, github.com/gptscript-ai/search/brave, sys.http.html2text?

What is today's weather in cupertino,California
cat test_context.gpt
name: search_context
export: sys.write
args: search_tool: tool to search with

#!/bin/bash
echo Search using ${search_tool}. Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can.Create a file with an appopriate name that represents the query and with contents of the search results
  1. Sometimes runtime error: index out of range error is encountered for sys.http.html2text tool call.
    panic: runtime error: index out of range [11] with length 11
goroutine 80 [running]:
github.com/olekukonko/tablewriter.(*Table).printFooter(0x140000fbc00)
	/Users/sangeethahariharan/go/pkg/mod/github.com/olekukonko/[email protected]/table.go:716 +0xa7c
github.com/olekukonko/tablewriter.(*Table).Render(0x140000fbc00)
	/Users/sangeethahariharan/go/pkg/mod/github.com/olekukonko/[email protected]/table.go:161 +0x90
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleTableElement(0x1400045de60, 0x1400037caf0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:360 +0x8e0
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400037caf0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:282 +0x600
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400046c000?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x140001d61c0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400037c9a0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:213 +0x250
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400045c020?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x1037406b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400037c850)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:213 +0x250
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400045c3c0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x1037406b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400037c7e0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:213 +0x250
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400045c760?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x1037406b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400035cfc0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1400045cbc8?, 0x102e55424?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x102e559bc?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400032f3b0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1400045cf68?, 0x140004bbf80?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x102e559bc?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400032ed90)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400045d240?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x1037406b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x140002f2460)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:213 +0x250
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x140000176d8?, 0x102d43a50?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x102d4bf14?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x14000017e60, 0x140001fe770)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x10386ea40?, 0x0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x10304d3b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x14000017e60, 0x14000150770)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x0?, 0x0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x36dc?, 0x1400032a000?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:408 +0xa4
github.com/jaytaylor/html2text.FromHTMLNode(0x1038a3860?, {0x14000018000?, 0x0?, 0x0?})
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:77 +0x84
github.com/jaytaylor/html2text.FromReader({0x1038a3860?, 0x14000248720?}, {0x14000018000, 0x1, 0x1})
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:98 +0x78
github.com/jaytaylor/html2text.FromString({0x1400042a000?, 0x4?}, {0x14000018000, 0x1, 0x1})
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:104 +0xf8
github.com/gptscript-ai/gptscript/pkg/builtin.SysHTTPHtml2Text({0x1038a9518?, 0x14000502300?}, {0x140003f2000?, 0x140000aa060?, 0x14000018078?}, {0x140002b40c0?, 0x140000aa060?})
	/Users/sangeethahariharan/gptscript/pkg/builtin/builtin.go:568 +0x6c
github.com/gptscript-ai/gptscript/pkg/builtin.Builtin.func1({0x1038a9518?, 0x14000502300?}, {0x140003f2000?, 0x5?, 0x140000180f8?}, {0x140002b40c0?, 0x103e22600?})
	/Users/sangeethahariharan/gptscript/pkg/builtin/builtin.go:234 +0x34
github.com/gptscript-ai/gptscript/pkg/engine.(*Engine).runCommand(_, {_, _}, {{{0x140002fa0c8, 0x12}, {0x103353121, 0x67}, 0x0, {0x1037ae88a, 0xb}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/engine/cmd.go:45 +0x2bc
github.com/gptscript-ai/gptscript/pkg/engine.(*Engine).Start(_, {{{0x140005006a0, 0x1d}, {{{...}, {...}, 0x0, {...}, 0x0, 0x0, 0x0, ...}, ...}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/engine/engine.go:192 +0x330
github.com/gptscript-ai/gptscript/pkg/runner.(*Runner).start(_, {{{0x140005006a0, 0x1d}, {{{...}, {...}, 0x0, {...}, 0x0, 0x0, 0x0, ...}, ...}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/runner/runner.go:407 +0x5e0
github.com/gptscript-ai/gptscript/pkg/runner.(*Runner).call(_, {{{0x140005006a0, 0x1d}, {{{...}, {...}, 0x0, {...}, 0x0, 0x0, 0x0, ...}, ...}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/runner/runner.go:355 +0x84
github.com/gptscript-ai/gptscript/pkg/runner.(*Runner).subCall(_, {_, _}, {{{0x103ccc788, 0x1}, {{{...}, {...}, 0x0, {...}, 0x0, ...}, ...}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/runner/runner.go:642 +0x180
github.com/gptscript-ai/gptscript/pkg/runner.(*Runner).subCalls.func1({0x1038a9550?, 0x140002da050?})
	/Users/sangeethahariharan/gptscript/pkg/runner/runner.go:716 +0xd0
github.com/gptscript-ai/gptscript/pkg/runner.(*parallelDispatcher).Run.func1()
	/Users/sangeethahariharan/gptscript/pkg/runner/parallel.go:51 +0x30
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/Users/sangeethahariharan/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
	/Users/sangeethahariharan/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x98

Note - On retry , this error is not seen and script is able to return the search results successfully.

@sangee2004 sangee2004 added the bug Something isn't working label May 7, 2024
@sangee2004
Copy link
Contributor Author

Debug logs:

gptscript --disable-cache --debug test_search_context.gpt 
{
  "level": "debug",
  "logger": "/pkg/loader",
  "msg": "opened test_search_context.gpt",
  "time": "2024-05-07T09:34:28-07:00"
}
{
  "level": "debug",
  "logger": "/pkg/loader",
  "msg": "opened https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt",
  "time": "2024-05-07T09:34:28-07:00"
}
{
  "level": "debug",
  "logger": "/pkg/loader",
  "msg": "opened https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave/tool.gpt",
  "time": "2024-05-07T09:34:29-07:00"
}
{
  "level": "debug",
  "logger": "/pkg/loader",
  "msg": "opened https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave-credential/tool.gpt",
  "time": "2024-05-07T09:34:29-07:00"
}
{
  "level": "debug",
  "logger": "/pkg/loader",
  "msg": "opened test_context.gpt",
  "time": "2024-05-07T09:34:29-07:00"
}
{
  "input": "",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "Run started",
  "program": {
    "name": "test_search_context.gpt",
    "entryToolId": "test_search_context.gpt:1",
    "toolSet": {
      "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave-credential/tool.gpt:1": {
        "name": "brave-credential",
        "modelName": "gpt-4-turbo",
        "internalPrompt": null,
        "instructions": "#!python3\n\nimport json\nimport subprocess\nimport sys\n\ntool_input = {\n    \"message\": \"Please enter your Brave Search API token.\",\n    \"fields\": \"token\",\n    \"sensitive\": \"true\",\n}\ncommand = [\"gptscript\", \"--quiet=true\", \"--disable-cache\", \"sys.prompt\", json.dumps(tool_input)]\nresult = subprocess.run(command, stdin=None, stdout=subprocess.PIPE, text=True)\n\nif result.returncode != 0:\n    print(\"Failed to run sys.prompt.\", file=sys.stderr)\n    sys.exit(1)\n\ntry:\n    resp = json.loads(result.stdout.strip())\n    token = resp[\"token\"]\n    output = {\n        \"env\": {\n            \"GPTSCRIPT_BRAVE_SEARCH_TOKEN\": token,\n        }\n    }\n    print(json.dumps(output))\nexcept json.JSONDecodeError:\n    print(\"Failed to decode JSON.\", file=sys.stderr)\n    sys.exit(1)",
        "id": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave-credential/tool.gpt:1",
        "localTools": {
          "brave-credential": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave-credential/tool.gpt:1"
        },
        "source": {
          "location": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave-credential/tool.gpt",
          "lineNo": 1,
          "repo": {
            "VCS": "git",
            "Root": "https://github.com/gptscript-ai/search.git",
            "Path": "brave-credential",
            "Name": "tool.gpt",
            "Revision": "bab8211e166086befc13aa9fd2da8e008f8a0d79"
          }
        },
        "workingDir": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave-credential"
      },
      "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave/tool.gpt:1": {
        "description": "Uses the Brave Search API to return web search results.",
        "modelName": "gpt-4-turbo",
        "internalPrompt": null,
        "arguments": {
          "properties": {
            "country": {
              "description": "(optional) The country code to use for the search in ISO 3166-2 format.",
              "type": "string"
            },
            "offset": {
              "description": "(optional) The offset to use for the search results (used for pagination).",
              "type": "string"
            },
            "q": {
              "description": "(required) The search query to use.",
              "type": "string"
            },
            "search_lang": {
              "description": "(optional) The language to use for the search as a standard IETF tag. There are a few exceptions: Chinese must be either zh-hans (Simplified) or zh-hant (Traditional). Japanese must be jp. Portuguese must be either pt-pt (Portugal) or pt-br (Brazil).",
              "type": "string"
            }
          },
          "type": "object"
        },
        "credentials": [
          "github.com/gptscript-ai/search/brave-credential"
        ],
        "instructions": "#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool \"${GPTSCRIPT_INPUT}\"",
        "id": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave/tool.gpt:1",
        "toolMapping": {
          "github.com/gptscript-ai/search/brave-credential": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave-credential/tool.gpt:1"
        },
        "localTools": {
          "": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave/tool.gpt:1"
        },
        "source": {
          "location": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave/tool.gpt",
          "lineNo": 1,
          "repo": {
            "VCS": "git",
            "Root": "https://github.com/gptscript-ai/search.git",
            "Path": "brave",
            "Name": "tool.gpt",
            "Revision": "bab8211e166086befc13aa9fd2da8e008f8a0d79"
          }
        },
        "workingDir": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave"
      },
      "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1": {
        "description": "Uses DuckDuckGo to return web search results.",
        "modelName": "gpt-4-turbo",
        "internalPrompt": null,
        "arguments": {
          "properties": {
            "q": {
              "description": "(required) The search query to use.",
              "type": "string"
            },
            "search_lang": {
              "description": "(optional) The language to use for the search. Format according to normal standards for the Accept-Language HTTP header. Defaults to en-US.",
              "type": "string"
            }
          },
          "type": "object"
        },
        "instructions": "#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool \"${GPTSCRIPT_INPUT}\"",
        "id": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1",
        "localTools": {
          "": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1"
        },
        "source": {
          "location": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt",
          "lineNo": 1,
          "repo": {
            "VCS": "git",
            "Root": "https://github.com/gptscript-ai/search.git",
            "Path": "duckduckgo",
            "Name": "tool.gpt",
            "Revision": "bab8211e166086befc13aa9fd2da8e008f8a0d79"
          }
        },
        "workingDir": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo"
      },
      "sys.http.html2text": {
        "name": "sys.http.html2text",
        "description": "Download the contents of a http or https URL returning the content as rendered text converted from HTML",
        "modelName": "gpt-4-turbo",
        "internalPrompt": null,
        "arguments": {
          "properties": {
            "url": {
              "description": "The URL to download",
              "type": "string"
            }
          },
          "type": "object"
        },
        "instructions": "#!sys.http.html2text",
        "id": "sys.http.html2text",
        "source": {}
      },
      "sys.write": {
        "name": "sys.write",
        "description": "Write the contents to a file",
        "modelName": "gpt-4-turbo",
        "internalPrompt": null,
        "arguments": {
          "properties": {
            "content": {
              "description": "The content to write",
              "type": "string"
            },
            "filename": {
              "description": "The name of the file to write to",
              "type": "string"
            }
          },
          "type": "object"
        },
        "instructions": "#!sys.write",
        "id": "sys.write",
        "source": {}
      },
      "test_context.gpt:1": {
        "name": "search_context",
        "modelName": "gpt-4-turbo",
        "internalPrompt": null,
        "arguments": {
          "properties": {
            "search_tool": {
              "description": "tool to search with",
              "type": "string"
            }
          },
          "type": "object"
        },
        "export": [
          "sys.write"
        ],
        "instructions": "#!/bin/bash\necho Search using ${search_tool}. Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can.Create a file with an appopriate name that represents the query and with contents of the search results.",
        "id": "test_context.gpt:1",
        "toolMapping": {
          "sys.write": "sys.write"
        },
        "localTools": {
          "search_context": "test_context.gpt:1"
        },
        "source": {
          "location": "test_context.gpt",
          "lineNo": 1
        },
        "workingDir": "."
      },
      "test_search_context.gpt:1": {
        "modelName": "gpt-4-turbo",
        "internalPrompt": null,
        "tools": [
          "github.com/gptscript-ai/search/duckduckgo",
          "github.com/gptscript-ai/search/brave",
          "sys.http.html2text?"
        ],
        "context": [
          "search_context from test_context.gpt with duckduckgo as search_tool"
        ],
        "instructions": "What is today's weather in cupertino,California?",
        "id": "test_search_context.gpt:1",
        "toolMapping": {
          "github.com/gptscript-ai/search/brave": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/brave/tool.gpt:1",
          "github.com/gptscript-ai/search/duckduckgo": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1",
          "search_context from test_context.gpt with duckduckgo as search_tool": "test_context.gpt:1",
          "sys.http.html2text?": "sys.http.html2text"
        },
        "localTools": {
          "": "test_search_context.gpt:1"
        },
        "source": {
          "location": "test_search_context.gpt",
          "lineNo": 1
        },
        "workingDir": "."
      }
    }
  },
  "runID": "1",
  "time": "2024-05-07T09:34:29-07:00"
}
{
  "id": "2",
  "input": "{\"search_tool\":\"duckduckgo\"}",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "started  [context: search_context from test_context.gpt with duckduckgo as search_tool]",
  "parentID": "1",
  "time": "2024-05-07T09:34:29-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "level": "debug",
  "logger": "/pkg/env",
  "msg": "Looking for /bin/bash in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin",
  "time": "2024-05-07T09:34:29-07:00"
}
{
  "id": "2",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "sent     [context: search_context from test_context.gpt with duckduckgo as search_tool]",
  "parentID": "1",
  "time": "2024-05-07T09:34:29-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "completionID": "1",
  "id": "2",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "1",
  "request": {
    "command": [
      "/bin/bash",
      "/var/folders/7x/wj1zrf9s5m92pmf8nctz5cs00000gn/T/gptscript958794252"
    ],
    "input": "{\"search_tool\":\"duckduckgo\"}"
  },
  "time": "2024-05-07T09:34:29-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "cached": false,
  "completionID": "1",
  "id": "2",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "1",
  "response": {
    "err": null,
    "output": "Search using duckduckgo. Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can.Create a file with an appopriate name that represents the query and with contents of the search results.\n"
  },
  "time": "2024-05-07T09:34:29-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "id": "2",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "ended    [context: search_context from test_context.gpt with duckduckgo as search_tool]",
  "output": "Search using duckduckgo. Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can.Create a file with an appopriate name that represents the query and with contents of the search results.\n",
  "parentID": "1",
  "time": "2024-05-07T09:34:29-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "id": "1",
  "input": "",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "started  [main]",
  "parentID": "",
  "time": "2024-05-07T09:34:29-07:00",
  "toolID": "test_search_context.gpt:1"
}
{
  "id": "1",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "sent     [main]",
  "parentID": "",
  "time": "2024-05-07T09:34:29-07:00",
  "toolID": "test_search_context.gpt:1"
}
{
  "completionID": "1",
  "id": "1",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "",
  "request": {
    "model": "gpt-4-turbo",
    "messages": [
      {
        "role": "system",
        "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nSearch using duckduckgo. Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can.Create a file with an appopriate name that represents the query and with contents of the search results.\n\nWhat is today's weather in cupertino,California?"
      }
    ],
    "temperature": 0,
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "duckduckgo",
          "description": "Uses DuckDuckGo to return web search results.",
          "parameters": {
            "properties": {
              "q": {
                "description": "(required) The search query to use.",
                "type": "string"
              },
              "search_lang": {
                "description": "(optional) The language to use for the search. Format according to normal standards for the Accept-Language HTTP header. Defaults to en-US.",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "brave",
          "description": "Uses the Brave Search API to return web search results.",
          "parameters": {
            "properties": {
              "country": {
                "description": "(optional) The country code to use for the search in ISO 3166-2 format.",
                "type": "string"
              },
              "offset": {
                "description": "(optional) The offset to use for the search results (used for pagination).",
                "type": "string"
              },
              "q": {
                "description": "(required) The search query to use.",
                "type": "string"
              },
              "search_lang": {
                "description": "(optional) The language to use for the search as a standard IETF tag. There are a few exceptions: Chinese must be either zh-hans (Simplified) or zh-hant (Traditional). Japanese must be jp. Portuguese must be either pt-pt (Portugal) or pt-br (Brazil).",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "httpHtml2text",
          "description": "Download the contents of a http or https URL returning the content as rendered text converted from HTML",
          "parameters": {
            "properties": {
              "url": {
                "description": "The URL to download",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "write",
          "description": "Write the contents to a file",
          "parameters": {
            "properties": {
              "content": {
                "description": "The content to write",
                "type": "string"
              },
              "filename": {
                "description": "The name of the file to write to",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      }
    ]
  },
  "time": "2024-05-07T09:34:29-07:00",
  "toolID": "test_search_context.gpt:1"
}
         content  [2] content | Waiting for model response...
         content  [2] content | tool call duckduckgo -> {"q":"today's weather in Cupertino, California"}
{
  "cached": false,
  "completionID": "1",
  "id": "1",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "",
  "response": {
    "role": "assistant",
    "content": [
      {
        "toolCall": {
          "index": 0,
          "id": "call_5owl9z2hM1SJi5TTkkF4txja",
          "function": {
            "name": "duckduckgo",
            "arguments": "{\"q\":\"today's weather in Cupertino, California\"}"
          }
        }
      }
    ]
  },
  "time": "2024-05-07T09:34:31-07:00",
  "toolID": "test_search_context.gpt:1"
}
{
  "id": "call_5owl9z2hM1SJi5TTkkF4txja",
  "input": "{\"q\":\"today's weather in Cupertino, California\"}",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "started  [https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt(3)]",
  "parentID": "1",
  "time": "2024-05-07T09:34:31-07:00",
  "toolID": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1"
}
{
  "level": "debug",
  "logger": "/pkg/repos",
  "msg": "Runtime go1.22.1 supports [${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool ${GPTSCRIPT_INPUT}]",
  "time": "2024-05-07T09:34:31-07:00"
}
{
  "level": "debug",
  "logger": "/pkg/env",
  "msg": "Looking for /Users/sangeethahariharan/Library/Caches/gptscript/repos/bab8211e166086befc13aa9fd2da8e008f8a0d79/go1.22.1/duckduckgo/bin/gptscript-go-tool in /Users/sangeethahariharan/Library/Caches/gptscript/repos/runtimes/golang/814b02bc348704a44a6e3e94b480b8fbe8639fe0453a2bfbf4715081e0d8b066/go/bin:/Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin",
  "time": "2024-05-07T09:34:31-07:00"
}
{
  "id": "call_5owl9z2hM1SJi5TTkkF4txja",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "sent     [https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt(3)]",
  "parentID": "1",
  "time": "2024-05-07T09:34:31-07:00",
  "toolID": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1"
}
{
  "completionID": "2",
  "id": "call_5owl9z2hM1SJi5TTkkF4txja",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "1",
  "request": {
    "command": [
      "/Users/sangeethahariharan/Library/Caches/gptscript/repos/bab8211e166086befc13aa9fd2da8e008f8a0d79/go1.22.1/duckduckgo/bin/gptscript-go-tool",
      "{\"q\":\"today's weather in Cupertino, California\"}"
    ],
    "input": "{\"q\":\"today's weather in Cupertino, California\"}"
  },
  "time": "2024-05-07T09:34:31-07:00",
  "toolID": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1"
}
{
  "cached": false,
  "completionID": "2",
  "id": "call_5owl9z2hM1SJi5TTkkF4txja",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "1",
  "response": {
    "err": null,
    "output": "Title: Tuesday will be mostly sunny for Northern California - KCRA Channel 3\nURL: https://www.kcra.com/article/northern-california-forecast-may-7-2024/60716923\nDescription: CONFUSING. YEAH. RIGHT. AS FAR AS THE WEATHER GOES HERE. WELL WE ARE GOING TO BE GETTING READY FOR SOME GUSTY WINDS WITH THE STRONGEST OF THOSE WINDS ARRIVING TONIGHT THROUGH THURSDAY MORNING. A ...\n\nTitle: Today's top weather news: Severe storm threat continues Tuesday after ...\nURL: https://www.foxweather.com/weather-news/daily-weather-update-may-7-2024\nDescription: Welcome to the Daily Weather Update from FOX Weather. It's Tuesday, May 7, 2024, and Teacher Appreciation Day. Start your day with everything you need to know about today's weather. You can also get a quick briefing of national, regional and local weather whenever you like with the FOX Weather Update podcast.\n\nTitle: In a pre-recorded live streamed event from its Cupertino, California ...\nURL: https://abc30.com/videoClip/14779107/\nDescription: In a pre-recorded live streamed event from its Cupertino, California headquarters, the company introduced the latest versions of its iPad Pro and iPad Air tablets and an all-new Apple Pencil Pro.\n\nTitle: Northern California will see warm weather, gust winds this week\nURL: https://www.kcra.com/article/northern-california-forecast-may-6-2024/60699900\nDescription: After a weekend of rainy, snowy and unsettled weather, Northern California is forecast to see a return to warmer days, but gusty winds are also expected.Meteorologist Kelly Curran said Monday and ...\n\nTitle: Apple unveils new iPad Pro with 'outrageously powerful' AI-powered chip\nURL: https://abc7chicago.com/apple-event-new-ipads-tim-cook-m4-processor/14778952/\nDescription: In a pre-recorded live streamed event from its Cupertino, California headquarters, the company introduced the latest versions of its iPad Pro and iPad Air tablets and an all-new Apple Pencil Pro.\n\nTitle: Cupertino girl, 11, dies after suspected DUI crash | KRON4\nURL: https://www.kron4.com/news/bay-area/cupertino-girl-11-dies-after-suspected-dui-crash/\nDescription: (KRON) — An 11-year-old girl has died after she was struck by a suspected DUI driver in Cupertino, a Santa Clara County Sheriff's Office spokesperson said. The girl was one of four chil…\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?lat=37.319300000000055\u0026lon=-122.03256999999996\nDescription: Cupertino CA 37.31°N 122.03°W (Elev. 262 ft) Last Update: 3:29 am PDT May 4, 2024. Forecast Valid: 6am PDT May 4, 2024-6pm PDT May 10, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?site=MTR\u0026textField1=37.3231\u0026textField2=-122.031\u0026e=0\nDescription: Cupertino CA 37.33°N 122.04°W (Elev. 243 ft) Last Update: 10:41 pm PDT May 3, 2024. Forecast Valid: 11pm PDT May 3, 2024-6pm PDT May 10, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Cupertino: Girl dies of injuries suffered in suspected DUI crash\nURL: https://www.eastbaytimes.com/2024/05/06/cupertino-girl-dies-of-injuries-suffered-in-suspected-dui-crash/\nDescription: An 11-year-old girl died last week of injuries she suffered in a suspected DUI crash late last month in Cupertino, South Bay authorities confirmed Monday.\n\nTitle: Cupertino, California, USA 14 day weather forecast - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino/ext\nDescription: Weather Today Weather Hourly 14 Day Forecast Yesterday/Past Weather Climate (Averages) ... See weather overview. 2 Week Extended Forecast in Cupertino, California, USA. Scroll right to see more Conditions Comfort Precipitation Sun; Day Temperature Weather Feels Like Wind Humidity Chance Amount UV Sunrise Sunset; Fri May 3: 73 / 51 °F: Partly ...\n\nTitle: Cupertino, California 7 Day Weather Forecast - The Weather Network\nURL: https://www.theweathernetwork.com/us/weather/california/cupertino\nDescription: Find the most current and reliable 7 day weather forecasts, storm alerts, reports and information for [city] with The Weather Network.\n\nTitle: Weather and Radar Map for Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/radar/interactive/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Interactive weather map allows you to pan and zoom to get unmatched weather details in your local neighborhood or ... Cupertino, CA Weather ... 30. Today. Hourly. 10 Day. Radar. Video. Cupertino ...\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?lat=37.3229978\u0026lon=-122.03218229999999\u0026site=all\u0026smap=1\u0026searchresult=Cupertino%2C%20CA%2C%20USA\u0026lg=ep\u0026\u0026FcstType=text\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 12:26 pm PST Feb 19, 2024 Forecast Valid: 1pm PST Feb 19, 2024-6pm PST Feb 25, 2024: Washington's Birthday Heavy Rain Hi 60 °F: Tonight\n\nTitle: Cupertino, CA, United States Weather - The Weather Channel\nURL: https://weather.com/en-CA/weather/tenday/l/Cupertino+CA+United+States?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Be prepared with the most accurate 10-day forecast for Cupertino, CA, United States with highs, lows, chance of precipitation from The Weather Channel and Weather.com\n\nTitle: Hourly forecast for Cupertino, California, USA - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino/hourly\nDescription: Hour-by-Hour Forecast for Cupertino, California, USA. Time/General. Weather. Time Zone. DST Changes. Sun \u0026 Moon. Weather Today Weather Hourly 14 Day Forecast Yesterday/Past Weather Climate (Averages) Currently: 48 °F. Clear.\n\nTitle: Weather for Cupertino, California, USA - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino\nDescription: 15. 81 / 53 °F. 16. 84 / 53 °F. 17. 18. Detailed forecast for 14 days. Need some help? Current weather in Cupertino and forecast for today, tomorrow, and next 14 days.\n\nTitle: 10-Day Weather Forecast for Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/tenday/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Be prepared with the most accurate 10-day forecast for Cupertino, CA with highs, lows, chance of precipitation from The Weather Channel and Weather.com\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=95129\nDescription: NOAA National Weather Service National Weather Service. Toggle navigation. HOME; FORECAST . Local; Graphical; Aviation; Marine; ... Current conditions at San Jose, San Jose International Airport (KSJC) Lat: ... 3 Miles ESE Cupertino CA 37.31°N 122.01°W (Elev. 197 ft) Last Update: 3:20 am PDT Apr 25, 2024.\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?lat=37.3229978\u0026lon=-122.03218229999999\u0026site=all\u0026smap=1\u0026searchresult=Cupertino%2C%20CA%2C%20USA\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 2:32 am PDT Apr 6, 2024 Forecast Valid: 8am PDT Apr 6, 2024-6pm PDT Apr 12, 2024: Today Mostly Sunny Hi 60 °F: Tonight Decreasing Clouds Lo 43 °F: Sunday Mostly Sunny Hi 62 °F: Sunday ...\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?site=MTR\u0026textField1=37.3231\u0026textField2=-122.031\u0026e=0\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 1:26 pm PDT May 2, 2024 Forecast Valid: 7pm PDT May 2, 2024-6pm PDT May 9, 2024: Tonight Mostly Clear Lo 50 °F: Friday Becoming Sunny\n\nTitle: Cupertino, CA Weather Conditions | Weather Underground\nURL: https://www.wunderground.com/weather/us/ca/cupertino/95014\nDescription: Cupertino Weather Forecasts. Weather Underground provides local \u0026 long-range weather forecasts, weatherreports, maps \u0026 tropical weather conditions for the Cupertino area.\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?lat=37.319\u0026lon=-122.0293\nDescription: Cupertino CA 37.31°N 122.03°W (Elev. 262 ft) Last Update: 9:39 am PDT Apr 30, 2024. Forecast Valid: 12pm PDT Apr 30, 2024-6pm PDT May 6, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Hourly Weather Forecast for Cupertino, CA - The Weather Channel ...\nURL: https://weather.com/weather/hourbyhour/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Hourly Local Weather Forecast, weather conditions, precipitation, dew point, humidity, wind from Weather.com and The Weather Channel\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=95014\nDescription: Current conditions at LOS ALTOS (LOAC1) Lat: 37.35472°NLon: 122.14167°W ... Local Forecast Office More Local Wx 3 Day History Hourly Weather Forecast. Extended Forecast for 3 Miles WSW Cupertino CA . Today. High: 73 °F. Sunny. Tonight. Low: 49 °F. Clear. Thursday. High: 74 °F ... Severe Weather ; Current Outlook Maps ; Drought ; Fire ...\n\nTitle: Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/today/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Today's and tonight's Cupertino, CA weather forecast, weather conditions and Doppler radar from The Weather Channel and Weather.com\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=Cupertino%2CCA\nDescription: Cupertino CA 37.33°N 122.04°W (Elev. 243 ft) Last Update: 2:38 pm PDT May 5, 2024. Forecast Valid: 6pm PDT May 5, 2024-6pm PDT May 12, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Cupertino, CA Weather Forecast | AccuWeather\nURL: https://www.accuweather.com/en/us/cupertino/95014/weather-forecast/332094\nDescription: Cupertino, CA Weather Forecast, with current conditions, wind, air quality, and what to expect for the next 3 days.\n\n"
  },
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1"
}
{
  "id": "call_5owl9z2hM1SJi5TTkkF4txja",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "ended    [https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt(3)]",
  "output": "Title: Tuesday will be mostly sunny for Northern California - KCRA Channel 3\nURL: https://www.kcra.com/article/northern-california-forecast-may-7-2024/60716923\nDescription: CONFUSING. YEAH. RIGHT. AS FAR AS THE WEATHER GOES HERE. WELL WE ARE GOING TO BE GETTING READY FOR SOME GUSTY WINDS WITH THE STRONGEST OF THOSE WINDS ARRIVING TONIGHT THROUGH THURSDAY MORNING. A ...\n\nTitle: Today's top weather news: Severe storm threat continues Tuesday after ...\nURL: https://www.foxweather.com/weather-news/daily-weather-update-may-7-2024\nDescription: Welcome to the Daily Weather Update from FOX Weather. It's Tuesday, May 7, 2024, and Teacher Appreciation Day. Start your day with everything you need to know about today's weather. You can also get a quick briefing of national, regional and local weather whenever you like with the FOX Weather Update podcast.\n\nTitle: In a pre-recorded live streamed event from its Cupertino, California ...\nURL: https://abc30.com/videoClip/14779107/\nDescription: In a pre-recorded live streamed event from its Cupertino, California headquarters, the company introduced the latest versions of its iPad Pro and iPad Air tablets and an all-new Apple Pencil Pro.\n\nTitle: Northern California will see warm weather, gust winds this week\nURL: https://www.kcra.com/article/northern-california-forecast-may-6-2024/60699900\nDescription: After a weekend of rainy, snowy and unsettled weather, Northern California is forecast to see a return to warmer days, but gusty winds are also expected.Meteorologist Kelly Curran said Monday and ...\n\nTitle: Apple unveils new iPad Pro with 'outrageously powerful' AI-powered chip\nURL: https://abc7chicago.com/apple-event-new-ipads-tim-cook-m4-processor/14778952/\nDescription: In a pre-recorded live streamed event from its Cupertino, California headquarters, the company introduced the latest versions of its iPad Pro and iPad Air tablets and an all-new Apple Pencil Pro.\n\nTitle: Cupertino girl, 11, dies after suspected DUI crash | KRON4\nURL: https://www.kron4.com/news/bay-area/cupertino-girl-11-dies-after-suspected-dui-crash/\nDescription: (KRON) — An 11-year-old girl has died after she was struck by a suspected DUI driver in Cupertino, a Santa Clara County Sheriff's Office spokesperson said. The girl was one of four chil…\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?lat=37.319300000000055\u0026lon=-122.03256999999996\nDescription: Cupertino CA 37.31°N 122.03°W (Elev. 262 ft) Last Update: 3:29 am PDT May 4, 2024. Forecast Valid: 6am PDT May 4, 2024-6pm PDT May 10, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?site=MTR\u0026textField1=37.3231\u0026textField2=-122.031\u0026e=0\nDescription: Cupertino CA 37.33°N 122.04°W (Elev. 243 ft) Last Update: 10:41 pm PDT May 3, 2024. Forecast Valid: 11pm PDT May 3, 2024-6pm PDT May 10, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Cupertino: Girl dies of injuries suffered in suspected DUI crash\nURL: https://www.eastbaytimes.com/2024/05/06/cupertino-girl-dies-of-injuries-suffered-in-suspected-dui-crash/\nDescription: An 11-year-old girl died last week of injuries she suffered in a suspected DUI crash late last month in Cupertino, South Bay authorities confirmed Monday.\n\nTitle: Cupertino, California, USA 14 day weather forecast - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino/ext\nDescription: Weather Today Weather Hourly 14 Day Forecast Yesterday/Past Weather Climate (Averages) ... See weather overview. 2 Week Extended Forecast in Cupertino, California, USA. Scroll right to see more Conditions Comfort Precipitation Sun; Day Temperature Weather Feels Like Wind Humidity Chance Amount UV Sunrise Sunset; Fri May 3: 73 / 51 °F: Partly ...\n\nTitle: Cupertino, California 7 Day Weather Forecast - The Weather Network\nURL: https://www.theweathernetwork.com/us/weather/california/cupertino\nDescription: Find the most current and reliable 7 day weather forecasts, storm alerts, reports and information for [city] with The Weather Network.\n\nTitle: Weather and Radar Map for Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/radar/interactive/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Interactive weather map allows you to pan and zoom to get unmatched weather details in your local neighborhood or ... Cupertino, CA Weather ... 30. Today. Hourly. 10 Day. Radar. Video. Cupertino ...\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?lat=37.3229978\u0026lon=-122.03218229999999\u0026site=all\u0026smap=1\u0026searchresult=Cupertino%2C%20CA%2C%20USA\u0026lg=ep\u0026\u0026FcstType=text\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 12:26 pm PST Feb 19, 2024 Forecast Valid: 1pm PST Feb 19, 2024-6pm PST Feb 25, 2024: Washington's Birthday Heavy Rain Hi 60 °F: Tonight\n\nTitle: Cupertino, CA, United States Weather - The Weather Channel\nURL: https://weather.com/en-CA/weather/tenday/l/Cupertino+CA+United+States?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Be prepared with the most accurate 10-day forecast for Cupertino, CA, United States with highs, lows, chance of precipitation from The Weather Channel and Weather.com\n\nTitle: Hourly forecast for Cupertino, California, USA - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino/hourly\nDescription: Hour-by-Hour Forecast for Cupertino, California, USA. Time/General. Weather. Time Zone. DST Changes. Sun \u0026 Moon. Weather Today Weather Hourly 14 Day Forecast Yesterday/Past Weather Climate (Averages) Currently: 48 °F. Clear.\n\nTitle: Weather for Cupertino, California, USA - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino\nDescription: 15. 81 / 53 °F. 16. 84 / 53 °F. 17. 18. Detailed forecast for 14 days. Need some help? Current weather in Cupertino and forecast for today, tomorrow, and next 14 days.\n\nTitle: 10-Day Weather Forecast for Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/tenday/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Be prepared with the most accurate 10-day forecast for Cupertino, CA with highs, lows, chance of precipitation from The Weather Channel and Weather.com\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=95129\nDescription: NOAA National Weather Service National Weather Service. Toggle navigation. HOME; FORECAST . Local; Graphical; Aviation; Marine; ... Current conditions at San Jose, San Jose International Airport (KSJC) Lat: ... 3 Miles ESE Cupertino CA 37.31°N 122.01°W (Elev. 197 ft) Last Update: 3:20 am PDT Apr 25, 2024.\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?lat=37.3229978\u0026lon=-122.03218229999999\u0026site=all\u0026smap=1\u0026searchresult=Cupertino%2C%20CA%2C%20USA\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 2:32 am PDT Apr 6, 2024 Forecast Valid: 8am PDT Apr 6, 2024-6pm PDT Apr 12, 2024: Today Mostly Sunny Hi 60 °F: Tonight Decreasing Clouds Lo 43 °F: Sunday Mostly Sunny Hi 62 °F: Sunday ...\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?site=MTR\u0026textField1=37.3231\u0026textField2=-122.031\u0026e=0\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 1:26 pm PDT May 2, 2024 Forecast Valid: 7pm PDT May 2, 2024-6pm PDT May 9, 2024: Tonight Mostly Clear Lo 50 °F: Friday Becoming Sunny\n\nTitle: Cupertino, CA Weather Conditions | Weather Underground\nURL: https://www.wunderground.com/weather/us/ca/cupertino/95014\nDescription: Cupertino Weather Forecasts. Weather Underground provides local \u0026 long-range weather forecasts, weatherreports, maps \u0026 tropical weather conditions for the Cupertino area.\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?lat=37.319\u0026lon=-122.0293\nDescription: Cupertino CA 37.31°N 122.03°W (Elev. 262 ft) Last Update: 9:39 am PDT Apr 30, 2024. Forecast Valid: 12pm PDT Apr 30, 2024-6pm PDT May 6, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Hourly Weather Forecast for Cupertino, CA - The Weather Channel ...\nURL: https://weather.com/weather/hourbyhour/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Hourly Local Weather Forecast, weather conditions, precipitation, dew point, humidity, wind from Weather.com and The Weather Channel\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=95014\nDescription: Current conditions at LOS ALTOS (LOAC1) Lat: 37.35472°NLon: 122.14167°W ... Local Forecast Office More Local Wx 3 Day History Hourly Weather Forecast. Extended Forecast for 3 Miles WSW Cupertino CA . Today. High: 73 °F. Sunny. Tonight. Low: 49 °F. Clear. Thursday. High: 74 °F ... Severe Weather ; Current Outlook Maps ; Drought ; Fire ...\n\nTitle: Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/today/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Today's and tonight's Cupertino, CA weather forecast, weather conditions and Doppler radar from The Weather Channel and Weather.com\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=Cupertino%2CCA\nDescription: Cupertino CA 37.33°N 122.04°W (Elev. 243 ft) Last Update: 2:38 pm PDT May 5, 2024. Forecast Valid: 6pm PDT May 5, 2024-6pm PDT May 12, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Cupertino, CA Weather Forecast | AccuWeather\nURL: https://www.accuweather.com/en/us/cupertino/95014/weather-forecast/332094\nDescription: Cupertino, CA Weather Forecast, with current conditions, wind, air quality, and what to expect for the next 3 days.\n\n",
  "parentID": "1",
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "https://raw.githubusercontent.com/gptscript-ai/search/bab8211e166086befc13aa9fd2da8e008f8a0d79/duckduckgo/tool.gpt:1"
}
{
  "id": "1",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "continue [main]",
  "parentID": "",
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "test_search_context.gpt:1",
  "toolResults": 1
}
{
  "id": "3",
  "input": "{\"search_tool\":\"duckduckgo\"}",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "started  [context: search_context from test_context.gpt with duckduckgo as search_tool]",
  "parentID": "1",
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "level": "debug",
  "logger": "/pkg/env",
  "msg": "Looking for /bin/bash in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin",
  "time": "2024-05-07T09:34:32-07:00"
}
{
  "id": "3",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "sent     [context: search_context from test_context.gpt with duckduckgo as search_tool]",
  "parentID": "1",
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "completionID": "3",
  "id": "3",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "1",
  "request": {
    "command": [
      "/bin/bash",
      "/var/folders/7x/wj1zrf9s5m92pmf8nctz5cs00000gn/T/gptscript1741146595"
    ],
    "input": "{\"search_tool\":\"duckduckgo\"}"
  },
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "cached": false,
  "completionID": "3",
  "id": "3",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "1",
  "response": {
    "err": null,
    "output": "Search using duckduckgo. Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can.Create a file with an appopriate name that represents the query and with contents of the search results.\n"
  },
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "id": "3",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "ended    [context: search_context from test_context.gpt with duckduckgo as search_tool]",
  "output": "Search using duckduckgo. Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can.Create a file with an appopriate name that represents the query and with contents of the search results.\n",
  "parentID": "1",
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "test_context.gpt:1"
}
{
  "id": "1",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "sent     [main]",
  "parentID": "",
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "test_search_context.gpt:1"
}
{
  "completionID": "2",
  "id": "1",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "",
  "request": {
    "model": "gpt-4-turbo",
    "messages": [
      {
        "role": "system",
        "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nSearch using duckduckgo. Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can.Create a file with an appopriate name that represents the query and with contents of the search results.\n\nWhat is today's weather in cupertino,California?"
      },
      {
        "role": "assistant",
        "content": "",
        "tool_calls": [
          {
            "id": "call_5owl9z2hM1SJi5TTkkF4txja",
            "type": "function",
            "function": {
              "name": "duckduckgo",
              "arguments": "{\"q\":\"today's weather in Cupertino, California\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": "Title: Tuesday will be mostly sunny for Northern California - KCRA Channel 3\nURL: https://www.kcra.com/article/northern-california-forecast-may-7-2024/60716923\nDescription: CONFUSING. YEAH. RIGHT. AS FAR AS THE WEATHER GOES HERE. WELL WE ARE GOING TO BE GETTING READY FOR SOME GUSTY WINDS WITH THE STRONGEST OF THOSE WINDS ARRIVING TONIGHT THROUGH THURSDAY MORNING. A ...\n\nTitle: Today's top weather news: Severe storm threat continues Tuesday after ...\nURL: https://www.foxweather.com/weather-news/daily-weather-update-may-7-2024\nDescription: Welcome to the Daily Weather Update from FOX Weather. It's Tuesday, May 7, 2024, and Teacher Appreciation Day. Start your day with everything you need to know about today's weather. You can also get a quick briefing of national, regional and local weather whenever you like with the FOX Weather Update podcast.\n\nTitle: In a pre-recorded live streamed event from its Cupertino, California ...\nURL: https://abc30.com/videoClip/14779107/\nDescription: In a pre-recorded live streamed event from its Cupertino, California headquarters, the company introduced the latest versions of its iPad Pro and iPad Air tablets and an all-new Apple Pencil Pro.\n\nTitle: Northern California will see warm weather, gust winds this week\nURL: https://www.kcra.com/article/northern-california-forecast-may-6-2024/60699900\nDescription: After a weekend of rainy, snowy and unsettled weather, Northern California is forecast to see a return to warmer days, but gusty winds are also expected.Meteorologist Kelly Curran said Monday and ...\n\nTitle: Apple unveils new iPad Pro with 'outrageously powerful' AI-powered chip\nURL: https://abc7chicago.com/apple-event-new-ipads-tim-cook-m4-processor/14778952/\nDescription: In a pre-recorded live streamed event from its Cupertino, California headquarters, the company introduced the latest versions of its iPad Pro and iPad Air tablets and an all-new Apple Pencil Pro.\n\nTitle: Cupertino girl, 11, dies after suspected DUI crash | KRON4\nURL: https://www.kron4.com/news/bay-area/cupertino-girl-11-dies-after-suspected-dui-crash/\nDescription: (KRON) — An 11-year-old girl has died after she was struck by a suspected DUI driver in Cupertino, a Santa Clara County Sheriff's Office spokesperson said. The girl was one of four chil…\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?lat=37.319300000000055\u0026lon=-122.03256999999996\nDescription: Cupertino CA 37.31°N 122.03°W (Elev. 262 ft) Last Update: 3:29 am PDT May 4, 2024. Forecast Valid: 6am PDT May 4, 2024-6pm PDT May 10, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?site=MTR\u0026textField1=37.3231\u0026textField2=-122.031\u0026e=0\nDescription: Cupertino CA 37.33°N 122.04°W (Elev. 243 ft) Last Update: 10:41 pm PDT May 3, 2024. Forecast Valid: 11pm PDT May 3, 2024-6pm PDT May 10, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Cupertino: Girl dies of injuries suffered in suspected DUI crash\nURL: https://www.eastbaytimes.com/2024/05/06/cupertino-girl-dies-of-injuries-suffered-in-suspected-dui-crash/\nDescription: An 11-year-old girl died last week of injuries she suffered in a suspected DUI crash late last month in Cupertino, South Bay authorities confirmed Monday.\n\nTitle: Cupertino, California, USA 14 day weather forecast - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino/ext\nDescription: Weather Today Weather Hourly 14 Day Forecast Yesterday/Past Weather Climate (Averages) ... See weather overview. 2 Week Extended Forecast in Cupertino, California, USA. Scroll right to see more Conditions Comfort Precipitation Sun; Day Temperature Weather Feels Like Wind Humidity Chance Amount UV Sunrise Sunset; Fri May 3: 73 / 51 °F: Partly ...\n\nTitle: Cupertino, California 7 Day Weather Forecast - The Weather Network\nURL: https://www.theweathernetwork.com/us/weather/california/cupertino\nDescription: Find the most current and reliable 7 day weather forecasts, storm alerts, reports and information for [city] with The Weather Network.\n\nTitle: Weather and Radar Map for Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/radar/interactive/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Interactive weather map allows you to pan and zoom to get unmatched weather details in your local neighborhood or ... Cupertino, CA Weather ... 30. Today. Hourly. 10 Day. Radar. Video. Cupertino ...\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?lat=37.3229978\u0026lon=-122.03218229999999\u0026site=all\u0026smap=1\u0026searchresult=Cupertino%2C%20CA%2C%20USA\u0026lg=ep\u0026\u0026FcstType=text\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 12:26 pm PST Feb 19, 2024 Forecast Valid: 1pm PST Feb 19, 2024-6pm PST Feb 25, 2024: Washington's Birthday Heavy Rain Hi 60 °F: Tonight\n\nTitle: Cupertino, CA, United States Weather - The Weather Channel\nURL: https://weather.com/en-CA/weather/tenday/l/Cupertino+CA+United+States?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Be prepared with the most accurate 10-day forecast for Cupertino, CA, United States with highs, lows, chance of precipitation from The Weather Channel and Weather.com\n\nTitle: Hourly forecast for Cupertino, California, USA - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino/hourly\nDescription: Hour-by-Hour Forecast for Cupertino, California, USA. Time/General. Weather. Time Zone. DST Changes. Sun \u0026 Moon. Weather Today Weather Hourly 14 Day Forecast Yesterday/Past Weather Climate (Averages) Currently: 48 °F. Clear.\n\nTitle: Weather for Cupertino, California, USA - timeanddate.com\nURL: https://www.timeanddate.com/weather/usa/cupertino\nDescription: 15. 81 / 53 °F. 16. 84 / 53 °F. 17. 18. Detailed forecast for 14 days. Need some help? Current weather in Cupertino and forecast for today, tomorrow, and next 14 days.\n\nTitle: 10-Day Weather Forecast for Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/tenday/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Be prepared with the most accurate 10-day forecast for Cupertino, CA with highs, lows, chance of precipitation from The Weather Channel and Weather.com\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=95129\nDescription: NOAA National Weather Service National Weather Service. Toggle navigation. HOME; FORECAST . Local; Graphical; Aviation; Marine; ... Current conditions at San Jose, San Jose International Airport (KSJC) Lat: ... 3 Miles ESE Cupertino CA 37.31°N 122.01°W (Elev. 197 ft) Last Update: 3:20 am PDT Apr 25, 2024.\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?lat=37.3229978\u0026lon=-122.03218229999999\u0026site=all\u0026smap=1\u0026searchresult=Cupertino%2C%20CA%2C%20USA\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 2:32 am PDT Apr 6, 2024 Forecast Valid: 8am PDT Apr 6, 2024-6pm PDT Apr 12, 2024: Today Mostly Sunny Hi 60 °F: Tonight Decreasing Clouds Lo 43 °F: Sunday Mostly Sunny Hi 62 °F: Sunday ...\n\nTitle: 7-Day Forecast for Latitude 37.33°N and Longitude 122.04°W\nURL: https://www.nws.noaa.gov/wtf/MapClick.php?site=MTR\u0026textField1=37.3231\u0026textField2=-122.031\u0026e=0\u0026lg=ep\nDescription: Cupertino CA: Enter Your \"City, ST\" or zip code : NWS Point Forecast: Cupertino CA 37.33°N 122.04°W: Mobile Weather Information | En Español Last Update: 1:26 pm PDT May 2, 2024 Forecast Valid: 7pm PDT May 2, 2024-6pm PDT May 9, 2024: Tonight Mostly Clear Lo 50 °F: Friday Becoming Sunny\n\nTitle: Cupertino, CA Weather Conditions | Weather Underground\nURL: https://www.wunderground.com/weather/us/ca/cupertino/95014\nDescription: Cupertino Weather Forecasts. Weather Underground provides local \u0026 long-range weather forecasts, weatherreports, maps \u0026 tropical weather conditions for the Cupertino area.\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/MapClick.php?lat=37.319\u0026lon=-122.0293\nDescription: Cupertino CA 37.31°N 122.03°W (Elev. 262 ft) Last Update: 9:39 am PDT Apr 30, 2024. Forecast Valid: 12pm PDT Apr 30, 2024-6pm PDT May 6, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Hourly Weather Forecast for Cupertino, CA - The Weather Channel ...\nURL: https://weather.com/weather/hourbyhour/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Hourly Local Weather Forecast, weather conditions, precipitation, dew point, humidity, wind from Weather.com and The Weather Channel\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=95014\nDescription: Current conditions at LOS ALTOS (LOAC1) Lat: 37.35472°NLon: 122.14167°W ... Local Forecast Office More Local Wx 3 Day History Hourly Weather Forecast. Extended Forecast for 3 Miles WSW Cupertino CA . Today. High: 73 °F. Sunny. Tonight. Low: 49 °F. Clear. Thursday. High: 74 °F ... Severe Weather ; Current Outlook Maps ; Drought ; Fire ...\n\nTitle: Cupertino, CA - The Weather Channel\nURL: https://weather.com/weather/today/l/Cupertino+CA?canonicalCityId=9e5b4ef2b0d7e159f9e1da4cf1ed88a992c0a094db76eb85b43adec82f426322\nDescription: Today's and tonight's Cupertino, CA weather forecast, weather conditions and Doppler radar from The Weather Channel and Weather.com\n\nTitle: National Weather Service\nURL: https://forecast.weather.gov/zipcity.php?inputstring=Cupertino%2CCA\nDescription: Cupertino CA 37.33°N 122.04°W (Elev. 243 ft) Last Update: 2:38 pm PDT May 5, 2024. Forecast Valid: 6pm PDT May 5, 2024-6pm PDT May 12, 2024 . ... Severe Weather ; Current Outlook Maps ; Drought ; Fire Weather ; Fronts/Precipitation Maps ; Current Graphical Forecast Maps ; Rivers ; Marine ; Offshore and High Seas; Hurricanes ;\n\nTitle: Cupertino, CA Weather Forecast | AccuWeather\nURL: https://www.accuweather.com/en/us/cupertino/95014/weather-forecast/332094\nDescription: Cupertino, CA Weather Forecast, with current conditions, wind, air quality, and what to expect for the next 3 days.\n\n",
        "name": "duckduckgo",
        "tool_call_id": "call_5owl9z2hM1SJi5TTkkF4txja"
      }
    ],
    "temperature": 0,
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "duckduckgo",
          "description": "Uses DuckDuckGo to return web search results.",
          "parameters": {
            "properties": {
              "q": {
                "description": "(required) The search query to use.",
                "type": "string"
              },
              "search_lang": {
                "description": "(optional) The language to use for the search. Format according to normal standards for the Accept-Language HTTP header. Defaults to en-US.",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "brave",
          "description": "Uses the Brave Search API to return web search results.",
          "parameters": {
            "properties": {
              "country": {
                "description": "(optional) The country code to use for the search in ISO 3166-2 format.",
                "type": "string"
              },
              "offset": {
                "description": "(optional) The offset to use for the search results (used for pagination).",
                "type": "string"
              },
              "q": {
                "description": "(required) The search query to use.",
                "type": "string"
              },
              "search_lang": {
                "description": "(optional) The language to use for the search as a standard IETF tag. There are a few exceptions: Chinese must be either zh-hans (Simplified) or zh-hant (Traditional). Japanese must be jp. Portuguese must be either pt-pt (Portugal) or pt-br (Brazil).",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "httpHtml2text",
          "description": "Download the contents of a http or https URL returning the content as rendered text converted from HTML",
          "parameters": {
            "properties": {
              "url": {
                "description": "The URL to download",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "write",
          "description": "Write the contents to a file",
          "parameters": {
            "properties": {
              "content": {
                "description": "The content to write",
                "type": "string"
              },
              "filename": {
                "description": "The name of the file to write to",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      }
    ]
  },
  "time": "2024-05-07T09:34:32-07:00",
  "toolID": "test_search_context.gpt:1"
}
         content  [2] content | Waiting for model response...
         content  [2] content | tool call httpHtml2text -> {"url":"https://www.timeanddate.com/weather/usa/cupertino"}
{
  "cached": false,
  "completionID": "2",
  "id": "1",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "",
  "response": {
    "role": "assistant",
    "content": [
      {
        "toolCall": {
          "index": 0,
          "id": "call_aCLvPJQS7D7QYrAFJSMq0Z6j",
          "function": {
            "name": "httpHtml2text",
            "arguments": "{\"url\":\"https://www.timeanddate.com/weather/usa/cupertino\"}"
          }
        }
      }
    ]
  },
  "time": "2024-05-07T09:34:35-07:00",
  "toolID": "test_search_context.gpt:1"
}
{
  "id": "call_aCLvPJQS7D7QYrAFJSMq0Z6j",
  "input": "{\"url\":\"https://www.timeanddate.com/weather/usa/cupertino\"}",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "started  [sys.http.html2text(5)]",
  "parentID": "1",
  "time": "2024-05-07T09:34:35-07:00",
  "toolID": "sys.http.html2text"
}
{
  "level": "debug",
  "logger": "/pkg/builtin",
  "msg": "http get https://www.timeanddate.com/weather/usa/cupertino",
  "time": "2024-05-07T09:34:35-07:00"
}
{
  "id": "call_aCLvPJQS7D7QYrAFJSMq0Z6j",
  "level": "info",
  "logger": "/pkg/monitor",
  "msg": "sent     [sys.http.html2text(5)]",
  "parentID": "1",
  "time": "2024-05-07T09:34:35-07:00",
  "toolID": "sys.http.html2text"
}
{
  "completionID": "4",
  "id": "call_aCLvPJQS7D7QYrAFJSMq0Z6j",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "1",
  "request": {
    "command": [
      "sys.http.html2text"
    ],
    "input": "{\"url\":\"https://www.timeanddate.com/weather/usa/cupertino\"}"
  },
  "time": "2024-05-07T09:34:35-07:00",
  "toolID": "sys.http.html2text"
}
{
  "cached": false,
  "completionID": "4",
  "id": "call_aCLvPJQS7D7QYrAFJSMq0Z6j",
  "level": "debug",
  "logger": "/pkg/monitor",
  "msg": "debug",
  "parentID": "1",
  "response": {
    "err": null,
    "output": ""
  },
  "time": "2024-05-07T09:34:35-07:00",
  "toolID": "sys.http.html2text"
}
panic: runtime error: index out of range [11] with length 11

goroutine 80 [running]:
github.com/olekukonko/tablewriter.(*Table).printFooter(0x140000fbc00)
	/Users/sangeethahariharan/go/pkg/mod/github.com/olekukonko/[email protected]/table.go:716 +0xa7c
github.com/olekukonko/tablewriter.(*Table).Render(0x140000fbc00)
	/Users/sangeethahariharan/go/pkg/mod/github.com/olekukonko/[email protected]/table.go:161 +0x90
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleTableElement(0x1400045de60, 0x1400037caf0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:360 +0x8e0
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400037caf0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:282 +0x600
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400046c000?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x140001d61c0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400037c9a0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:213 +0x250
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400045c020?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x1037406b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400037c850)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:213 +0x250
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400045c3c0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x1037406b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400037c7e0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:213 +0x250
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400045c760?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x1037406b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400035cfc0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1400045cbc8?, 0x102e55424?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x102e559bc?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400032f3b0)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1400045cf68?, 0x140004bbf80?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x102e559bc?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x1400032ed90)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x1?, 0x1400045d240?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x1037406b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x1400045de60, 0x140002f2460)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:213 +0x250
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x140000176d8?, 0x102d43a50?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x102d4bf14?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x14000017e60, 0x140001fe770)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x10386ea40?, 0x0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x10304d3b8?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).handleElement(0x14000017e60, 0x14000150770)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:299 +0x73c
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x0?, 0x0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:420 +0x94
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverseChildren(0x1400045de60, 0x0?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:426 +0x40
github.com/jaytaylor/html2text.(*textifyTraverseContext).traverse(0x36dc?, 0x1400032a000?)
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:408 +0xa4
github.com/jaytaylor/html2text.FromHTMLNode(0x1038a3860?, {0x14000018000?, 0x0?, 0x0?})
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:77 +0x84
github.com/jaytaylor/html2text.FromReader({0x1038a3860?, 0x14000248720?}, {0x14000018000, 0x1, 0x1})
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:98 +0x78
github.com/jaytaylor/html2text.FromString({0x1400042a000?, 0x4?}, {0x14000018000, 0x1, 0x1})
	/Users/sangeethahariharan/go/pkg/mod/github.com/jaytaylor/[email protected]/html2text.go:104 +0xf8
github.com/gptscript-ai/gptscript/pkg/builtin.SysHTTPHtml2Text({0x1038a9518?, 0x14000502300?}, {0x140003f2000?, 0x140000aa060?, 0x14000018078?}, {0x140002b40c0?, 0x140000aa060?})
	/Users/sangeethahariharan/gptscript/pkg/builtin/builtin.go:568 +0x6c
github.com/gptscript-ai/gptscript/pkg/builtin.Builtin.func1({0x1038a9518?, 0x14000502300?}, {0x140003f2000?, 0x5?, 0x140000180f8?}, {0x140002b40c0?, 0x103e22600?})
	/Users/sangeethahariharan/gptscript/pkg/builtin/builtin.go:234 +0x34
github.com/gptscript-ai/gptscript/pkg/engine.(*Engine).runCommand(_, {_, _}, {{{0x140002fa0c8, 0x12}, {0x103353121, 0x67}, 0x0, {0x1037ae88a, 0xb}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/engine/cmd.go:45 +0x2bc
github.com/gptscript-ai/gptscript/pkg/engine.(*Engine).Start(_, {{{0x140005006a0, 0x1d}, {{{...}, {...}, 0x0, {...}, 0x0, 0x0, 0x0, ...}, ...}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/engine/engine.go:192 +0x330
github.com/gptscript-ai/gptscript/pkg/runner.(*Runner).start(_, {{{0x140005006a0, 0x1d}, {{{...}, {...}, 0x0, {...}, 0x0, 0x0, 0x0, ...}, ...}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/runner/runner.go:407 +0x5e0
github.com/gptscript-ai/gptscript/pkg/runner.(*Runner).call(_, {{{0x140005006a0, 0x1d}, {{{...}, {...}, 0x0, {...}, 0x0, 0x0, 0x0, ...}, ...}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/runner/runner.go:355 +0x84
github.com/gptscript-ai/gptscript/pkg/runner.(*Runner).subCall(_, {_, _}, {{{0x103ccc788, 0x1}, {{{...}, {...}, 0x0, {...}, 0x0, ...}, ...}, ...}, ...}, ...)
	/Users/sangeethahariharan/gptscript/pkg/runner/runner.go:642 +0x180
github.com/gptscript-ai/gptscript/pkg/runner.(*Runner).subCalls.func1({0x1038a9550?, 0x140002da050?})
	/Users/sangeethahariharan/gptscript/pkg/runner/runner.go:716 +0xd0
github.com/gptscript-ai/gptscript/pkg/runner.(*parallelDispatcher).Run.func1()
	/Users/sangeethahariharan/gptscript/pkg/runner/parallel.go:51 +0x30
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/Users/sangeethahariharan/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
	/Users/sangeethahariharan/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x98

@sangee2004 sangee2004 changed the title runtime error: index out of range error when using sys.http.html2text runtime error: index out of range error encountered sometimes when using sys.http.html2text May 7, 2024
@rinor
Copy link
Contributor

rinor commented May 7, 2024

just fyi, that happens usually at (github.com/olekukonko/tablewriter v0.0.6-0.20230925090304-df64c4bbad77) when there is a mismatch between the number of header items and footer items (when footer length < header length).

There was a fix pushed at #153 to update to the latest version of tablewriter containing a fix for this issue, but, iirc, that did fix only one case scenario (header length - footer length <= 1), other cases where header length - footer length > 1 should still suffer, and probably this might be the case here, at times depending on the output fed by html2text

For completeness, some code to reproduce this

package main

import (
	"os"

	"github.com/olekukonko/tablewriter"
)

func main() {

	data := [][]string{
		{"A", "The Good", "500", "500"},
		{"B", "The Very very Bad Man", "288", "500"},
		{"C", "The Ugly", "120", "500"},
		{"D", "The Gopher", "800", "500"},
	}

	table := tablewriter.NewWriter(os.Stdout)
	table.SetHeader([]string{"H0", "H1", "H2", "H3"})

	// table.SetFooter([]string{"F0", "F1", "F2", "F3"}) // works
	// table.SetFooter([]string{"F0", "F1", "F2"})       // works
	table.SetFooter([]string{"F0", "F1"}) // panics

	for _, v := range data {
		table.Append(v)
	}
	table.Render() // Send output
}

@rinor
Copy link
Contributor

rinor commented May 25, 2024

pushed a pr upstream that should fix this - olekukonko/tablewriter#228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants