Open sangee2004 opened 7 months ago
The stack trace is slightly different when using vision tool from github repo url:
tools: github.com/gptscript-ai/vision
Describe the picture in file ~/Downloads/sunrise.jpeg for me
gptscript vision.gpt
17:30:24 started [main]
17:30:24 sent [main]
content [1] content | Waiting for model response...
content [1] content | tool call vision -> {"images":"file ~/Downloads/sunrise.jpeg","prompt":"Describe the picture in detail."}
17:30:27 started [vision(2)] [input={"images":"file ~/Downloads/sunrise.jpeg","prompt":"Describe the picture in detail."}]
17:30:27 sent [vision(2)]
node:internal/url:804
this.#updateContext(bindingUrl.parse(input, base));
^
TypeError: Invalid URL
at new URL (node:internal/url:804:36)
at resolveImageURL (file:///Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js:81:15)
at Command.run (file:///Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js:57:20)
at Command.listener [as _actionHandler] (/Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:482:17)
at /Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:1283:65
at Command._chainOrCall (/Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:1177:12)
at Command._parseCommand (/Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:1283:27)
at Command.parseAsync (/Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:935:16)
at main (file:///Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js:47:17)
at file:///Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js:100:1 {
code: 'ERR_INVALID_URL',
input: 'file ~/Downloads/sunrise.jpeg'
}
Node.js v21.7.0
17:30:27 failed to run tool [vision] cmd [/usr/bin/env node /Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js Describe the picture in detail. file ~/Downloads/sunrise.jpeg]: exit status 1
2024/03/11 17:30:27 ERROR: node:internal/url:804
this.#updateContext(bindingUrl.parse(input, base));
^
TypeError: Invalid URL
at new URL (node:internal/url:804:36)
at resolveImageURL (file:///Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js:81:15)
at Command.run (file:///Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js:57:20)
at Command.listener [as _actionHandler] (/Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:482:17)
at /Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:1283:65
at Command._chainOrCall (/Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:1177:12)
at Command._parseCommand (/Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:1283:27)
at Command.parseAsync (/Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/node_modules/commander/lib/command.js:935:16)
at main (file:///Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js:47:17)
at file:///Users/sangeethahariharan/Library/Caches/gptscript/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21/index.js:100:1 {
code: 'ERR_INVALID_URL',
input: 'file ~/Downloads/sunrise.jpeg'
}
Node.js v21.7.0
: exit status 1
Steps to reproduce the problem:
Script fails to execute with following errors:
Note - Using the file path as
/Users/sangeethahariharan/Downloads/sunrise.jpeg
works as expected.