- 
                Notifications
    
You must be signed in to change notification settings  - Fork 295
 
Closed
Description
When attempting to run the UI with gptscript --ui ./<script-path>/<script-name>.gpt, the UI will fail to run due to the open command not being present on the machine.
$ uname -sro
Linux 6.6.32-1-lts GNU/Linux$ gptscript --ui ./gptscripts/hello.gpt --disable-tui  
06:31:52 started  [main] [input=--file=hello]  
06:31:52 started  [context: github.com/gptscript-ai/context/os]  
06:31:52 sent     [context: github.com/gptscript-ai/context/os]  
06:31:52 ended    [context: github.com/gptscript-ai/context/os] [output=The local operating systems is Linux, release 6.6.32-1-lts]  
06:31:52 sent     [main]  
        content  [2] content | The local operating systems is Linux, release 6.6.32-1-lts  
        content  [2] content |    
06:31:52 started  [service(3)] [input={}]  
06:31:52 launched [service][https://raw.githubusercontent.com/gptscript-ai/ui/61353f292abd0395a7357735b8fba5ddca5bebde/tool.gpt:service] port [11158] [/usr/local/bin/gp  
tscript sys.daemon /usr/bin/env npm run --prefix /home/greeves/.cache/gptscript/repos/61353f292abd0395a7357735b8fba5ddca5bebde/tool.gpt/node21 dev]  
  
> next-app-template@0.0.1 dev  
> node server.mjs  
  
> Socket server is ready at http://localhost:11158  
(node:183611) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.  
(Use `node --trace-deprecation ...` to show where the warning was created)  
○ Compiling / ...  
✓ Compiled / in 10.2s (4332 modules)  
GET / 200 in 10618ms  
POST / 200 in 40ms  
06:32:06 ended    [service(3)] [output=\u003c!DOCTYPE html\u003e\u003chtml lang=\"en\"\u003e\u003chead\u003e\u003cmeta charSet=\"utf-8\"/\u003e\u003cmeta name=\"viewpor  
t\" content=\"width=dev...]  
06:32:06 continue [main]  
06:32:06 started  [context: github.com/gptscript-ai/context/os]  
06:32:06 sent     [context: github.com/gptscript-ai/context/os]  
06:32:06 ended    [context: github.com/gptscript-ai/context/os] [output=The local operating systems is Linux, release 6.6.32-1-lts]  
06:32:06 sent     [main]  
        content  [1] content | Waiting for model response...  
        content  [1] content | <tool call> port -> {}         content  [4] content | The local operating systems is Linux, release 6.6.32-1-lts  
        content  [4] content |    
  
06:32:08 started  [port(5)] [input={}]  
○ Compiling /api/port ...  
✓ Compiled /api/port in 2.9s (2304 modules)  
06:32:11 ended    [port(5)] [output=11158]  
POST /api/port 200 in 3014ms  
06:32:11 continue [main]  
06:32:11 started  [context: github.com/gptscript-ai/context/os]  
06:32:11 sent     [context: github.com/gptscript-ai/context/os]  
06:32:11 ended    [context: github.com/gptscript-ai/context/os] [output=The local operating systems is Linux, release 6.6.32-1-lts]  
06:32:11 sent     [main]  
        content  [1] content | Waiting for model response...  
        content  [1] content | <tool call> openFileNix -> {"file":"hello","port":"11158"}         content  [6] content | The local operating systems is Linux  
, release 6.6.32-1-lts  
        content  [6] content |    
  
06:32:12 started  [open-file-nix(7)] [input={"file":"hello","port":"11158"}]  
06:32:12 sent     [open-file-nix(7)]  
/tmp/gptscript4140390925: line 2: open: command not found  
06:32:12 ended    [open-file-nix(7)] [output=ERROR: got (exit status 127) while running tool, OUTPUT: /tmp/gptscript4140390925: line 2: open: com...]  
06:32:12 continue [main]  
06:32:12 started  [context: github.com/gptscript-ai/context/os]  
06:32:12 sent     [context: github.com/gptscript-ai/context/os]  
06:32:12 ended    [context: github.com/gptscript-ai/context/os] [output=The local operating systems is Linux, release 6.6.32-1-lts]  
06:32:12 sent     [main]  
        content  [1] content | Waiting for model response...  
        content  [1] content | The command to open the file failed because the `open` command was not found. Please ensure that the `open` command is available on your  
system or provide an alternative method to open the file.  
        content  [8] content | The local operating systems is Linux, release 6.6.32-1-lts  
        content  [8] content |    
06:32:14 ended    [main] [output=The command to open the file failed because the `open` command was not found. Please ensure that the...]  
06:32:14 usage    [total=36202] [prompt=36127] [completion=75]  
  
INPUT:  
  
--file=hello  
  
OUTPUT:  
  
The command to open the file failed because the `open` command was not found. Please ensure that the `open` command is available on your system or provide an alternative method to open the file.I believe this could be fixed by using the appropriate command based on the OS, for instance xdg-open would work on most Linux platforms, open should be limited to MacOS.
Metadata
Metadata
Assignees
Labels
No labels