gptscript-ai / gptscript

Build AI assistants that interact with your systems
https://gptscript.ai
Apache License 2.0
2.88k stars 254 forks source link

Not able to launch UI with local models. #633

Closed sangee2004 closed 1 month ago

sangee2004 commented 1 month ago

gptscript version v0.0.0-dev-0c73f4b8-dirty

  1. Host the local model - rubra-meta-llama-3-8b-instruct.Q8_0.gguf
  2. Try to launch UI.

UI fails to launch with following output:

gptscript --ui --disable-cache --default-model 'rubra-meta-llama-3-8b-instruct.Q8_0.gguf from http://localhost:1234/v1'
12:18:37 WARNING: Changing the default model can have unknown behavior for existing tools. Use the model field per tool instead.
12:18:39 started  [main]
12:18:39 started  [context: github.com/gptscript-ai/context/os]
12:18:39 sent     [context: github.com/gptscript-ai/context/os]
12:18:39 ended    [context: github.com/gptscript-ai/context/os] [output=The local operating systems is Darwin, release 23.3.0]
12:18:40 sent     [main]
         content  [1] content | Waiting for model response...
         content  [1] content | <tool call> service -> {}
         content  [2] content | The local operating systems is Darwin, release 23.3.0
         content  [2] content | 
12:18:42 started  [service(3)] [input={}]
         content  [3] content | Fetching 97888e009ce9031b5b187b28d7a58d1f946c4e33 at https://github.com/gptscript-ai/ui.git
         content  [3] content | Checking out 97888e009ce9031b5b187b28d7a58d1f946c4e33 to /Users/sangeethahariharan/Library/Caches/gp ...
         content  [3] content | Running npm in /Users/sangeethahariharan/Library/Caches/gptscript/repos/97888e009ce9031b5b187b28d7a5 ...12:18:48 launched [service][https://raw.githubusercontent.com/gptscript-ai/ui/97888e009ce9031b5b187b28d7a58d1f946c4e33/tool.gpt:service] port [11049] [/usr/local/bin/gptscript sys.daemon /usr/bin/env npm run --prefix /Users/sangeethahariharan/Library/Caches/gptscript/repos/97888e009ce9031b5b187b28d7a58d1f946c4e33/tool.gpt/node21 dev]

> next-app-template@0.0.1 dev
> node server.mjs

> Socket server is ready at http://localhost:11049
 ✓ Compiled /api/readyz in 130ms (27 modules)
 GET /api/readyz 200 in 169ms
 POST /api/readyz 200 in 12ms

12:18:51 ended    [service(3)] [output=ok]
12:18:51 continue [main]
12:18:51 started  [context: github.com/gptscript-ai/context/os]
12:18:51 sent     [context: github.com/gptscript-ai/context/os]
12:18:52 ended    [context: github.com/gptscript-ai/context/os] [output=The local operating systems is Darwin, release 23.3.0]
12:18:52 sent     [main]
         content  [1] content | Waiting for model response...
         content  [1] content | <tool call> port -> {}
         content  [4] content | The local operating systems is Darwin, release 23.3.0
         content  [4] content | 
12:18:54 started  [port(5)] [input={}]
 ✓ Compiled /api/port in 31ms (29 modules)
 POST /api/port 200 in 52ms
12:18:54 ended    [port(5)] [output=11049]
12:18:54 continue [main]
12:18:54 started  [context: github.com/gptscript-ai/context/os]
12:18:54 sent     [context: github.com/gptscript-ai/context/os]
12:18:54 ended    [context: github.com/gptscript-ai/context/os] [output=The local operating systems is Darwin, release 23.3.0]
12:18:54 sent     [main]
         content  [1] content | Waiting for model response...
         content  [1] content | <tool call> openFileNix -> {}
         content  [6] content | The local operating systems is Darwin, release 23.3.0
         content  [6] content | 
12:18:56 started  [open-file-nix(7)] [input={}]
         content  [7] content | Fetching 97888e009ce9031b5b187b28d7a58d1f946c4e33 at https://github.com/gptscript-ai/ui.git
         content  [7] content | Checking out 97888e009ce9031b5b187b28d7a58d1f946c4e33 to /Users/sangeethahariharan/Library/Caches/gp ...
12:18:56 sent     [open-file-nix(7)]
/var/folders/7x/wj1zrf9s5m92pmf8nctz5cs00000gn/T/gptscript2996925865: line 2: xdg-open: command not found
12:18:56 ended    [open-file-nix(7)] [output=ERROR: got (exit status 127) while running tool, OUTPUT: /var/folders/7x/wj1zrf9s5m92pmf8nctz5cs0000...]
12:18:56 continue [main]
12:18:56 started  [context: github.com/gptscript-ai/context/os]
12:18:56 sent     [context: github.com/gptscript-ai/context/os]
12:18:57 ended    [context: github.com/gptscript-ai/context/os] [output=The local operating systems is Darwin, release 23.3.0]
12:18:57 sent     [main]
         content  [1] content | Waiting for model response...
         content  [1] content | The operation of opening the file using the 'openFileNix' tool failed because the 'xdg-open' command is not found in the system's PATH. Please ensure that 'xdg-open' is installed and available in the PATH, or use an alternative method to open the file.
         content  [8] content | The local operating systems is Darwin, release 23.3.0
         content  [8] content | 
12:19:00 ended    [main] [output=The operation of opening the file using the 'openFileNix' tool failed because the 'xdg-open' command...]
12:19:00 usage    [total=2533] [prompt=2420] [completion=113]

OUTPUT:

The operation of opening the file using the 'openFileNix' tool failed because the 'xdg-open' command is not found in the system's PATH. Please ensure that 'xdg-open' is installed and available in the PATH, or use an alternative method to open the file.

Following errors seen in local model console:

starttoolcall{"name":"service","arguments":{}}endtoolcall<|eot_id|><|start_header_id|>user<|end_header_id|>

start observation ["ok"] end observation<|eot_id|><|start_header_id|>assistant<|end_header_id|>

starttoolcall{"name":"port","arguments":{}}endtoolcall<|eot_id|><|start_header_id|>user<|end_header_id|>

start observation ["11049"] end observation<|eot_id|><|start_header_id|>assistant<|end_header_id|>

starttoolcall{"name":"openFileNix","arguments":{}}endtoolcall<|eot_id|><|start_header_id|>user<|end_header_id|>

start observation ["ERROR: got (exit status 127) while running tool, OUTPUT: /var/folders/7x/wj1zrf9s5m92pmf8nctz5cs00000gn/T/gptscript2996925865: line 2: xdg-open: command not found\n"] end observation<|eot_id|><|start_header_id|>assistant<|end_header_id|>
njhale commented 1 month ago

Should be fixed by https://github.com/gptscript-ai/gptscript/pull/631

sangee2004 commented 1 month ago

Tested with gptscript version v0.0.0-dev-6e92ee7a-dirty

Able to launch UI successfully using local providers.