Skip to content

Using "~" in --cache-dir does not work properly #148

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

Closed
sangee2004 opened this issue Mar 12, 2024 · 1 comment
Closed

Using "~" in --cache-dir does not work properly #148

sangee2004 opened this issue Mar 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sangee2004
Copy link
Contributor

Steps to reproduce the problem:

  1. Use "~" in --cache-dir like - gptscript --cache-dir=~/testcache vision.gpt
tools: github.com/gptscript-ai/vision

Describe the picture in file /users/sangeethahariharan/Downloads/sunrise.jpeg for me

This fails with following errors:

17:39:46 started  [main]
17:39:46 sent     [main]
         content  [1] content | Waiting for model response...
         content  [1] content | tool call vision -> {"images":"file:///users/sangeethahariharan/Downloads/sunrise.jpeg","prompt":"Describe the picture in detail."}
17:39:48 started  [vision(2)] [input={"images":"file:///users/sangeethahariharan/Downloads/sunrise.jpeg","prompt":"Describe the picture in detail."}]
17:39:48 Cloning https://github.com/gptscript-ai/vision.git
17:39:49 Fetching 46ac5323baf9da743f238a313b5b78608b2d4dbf at https://github.com/gptscript-ai/vision.git
17:39:49 Checking out 46ac5323baf9da743f238a313b5b78608b2d4dbf to ~/testcache/repos/46ac5323baf9da743f238a313b5b78608b2d4dbf/node21
17:39:49 Downloading Node 21.x
2024/03/11 17:39:51 fork/exec ~/testcache/repos/runtimes/node/673f54c844864777b8630b9478e27283532f0d475ea502e114cdac1c75b75bad/node-v21.7.0-darwin-x64/bin/npm: no such file or directory

~ is not used as home dir and I see directory ~ created under the current working directory which gets used as the cache dir.

pwd
/Users/sangeethahariharan/gptscriprelease/gptscript/examples/~/testcache/repos/runtimes/node/673f54c844864777b8630b9478e27283532f0d475ea502e114cdac1c75b75bad
sangeethahariharan@Sangeethas-MacBook-Pro-2 673f54c844864777b8630b9478e27283532f0d475ea502e114cdac1c75b75bad % ls -ltr
total 0

Note - Using ~ with image-generation tool seems to not break the tool from working using ~ created under the current working directory .

Expected Behavior:
~ should be translated to home dir and we should be able to use the tools successfully .

@sangee2004
Copy link
Contributor Author

gptscript version - v0.0.0-dev-a5a0538d-dirty

Able to use "~" in --cache-dir successfully.

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