gptscript icon indicating copy to clipboard operation
gptscript copied to clipboard

Not able to make use of tools from other repo directories.

Open sangee2004 opened this issue 1 year ago • 0 comments

Steps to reproduce the problem:

  1. Cloned https://github.com/gptscript-ai/vision to my home directory.
  2. Tried to execute the following script were tool is provided the relative path to access the tool.gpt from step1.
tools: ../../../vision/tool.gpt

Describe the picture in file /Users/sangeethahariharan/Downloads/sunrise.jpeg for me
  1. Script fails with following errors:
gptscript testvision.gpt                                                 
15:09:43 started  [main]
15:09:43 sent     [main]
         content  [1] content | Waiting for model response...
         content  [1] content | tool call -vision-tool-a7c56c59 -> {"images":"file:///Users/sangeethahariharan/Downloads/sunrise.jpeg","prompt":"Describe the picture."}
15:09:47 started  [vision(2)] [input={"images":"file:///Users/sangeethahariharan/Downloads/sunrise.jpeg","prompt":"Describe the picture."}]
15:09:47 sent     [vision(2)]
node:internal/modules/cjs/loader:1152
  throw err;
  ^

Error: Cannot find module '/Users/sangeethahariharan/gpt/gptscript/examples/index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15)
    at Module._load (node:internal/modules/cjs/loader:990:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v21.6.2
15:09:47 failed to run tool [vision] cmd [/bin/bash /var/folders/xt/zg5q3qtj07q84xvf0_80pfdh0000gn/T/gptscript379155314]: exit status 1
2024/02/22 15:09:47 ERROR: node:internal/modules/cjs/loader:1152
  throw err;
  ^

Error: Cannot find module '/Users/sangeethahariharan/gpt/gptscript/examples/index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15)
    at Module._load (node:internal/modules/cjs/loader:990:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v21.6.2
: exit status 1

sangee2004 avatar Feb 23 '24 00:02 sangee2004