Skip to content

UI - Changing workspace from UI does not take effect #579

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 Jun 27, 2024 · 3 comments
Closed

UI - Changing workspace from UI does not take effect #579

sangee2004 opened this issue Jun 27, 2024 · 3 comments
Labels
bug Something isn't working UI Issues relating to "--ui" option

Comments

@sangee2004
Copy link
Contributor

gptscript version - v0.0.0-dev-51fd2b32-dirty

Steps to reproduce the problem

  1. Get k8s docs made available in local directory using git clone https://github.com/kubernetes/website.git
  2. Run the following script to launch knowledge chat agent without workspace option - gptscript --ui --disable-cache knowledge_remote.gpt
tools: github.com/gptscript-ai/knowledge
context: github.com/gptscript-ai/context/workspace
chat: true

You are a helpful assistant that can retrieve information and answer questions using your tools. When you strat just introduce yourself and wait for the user to prompt you. 
You must use the knowledge tool to look up answers to your questions. Do NOT use the read tool. You may only answer questions with information you retrieve from the knowledge tool.
When you give answers, always give a proper citation to the best of your abilities.
  1. Used UI to set workspace parameter (edit existing value seen for workspace) and set it to k8s doc directory from step1 . This resulted in UI prompting to restart the script and allow for this operartion.
  2. Once script is loaded , tool calls made still continue to use the default workspace that was presented to me initially and I dont get any results for queries relating to k8s.
Screenshot 2024-06-27 at 1 55 49 PM Screenshot 2024-06-27 at 1 56 12 PM
@sangee2004 sangee2004 added bug Something isn't working UI Issues relating to "--ui" option labels Jun 27, 2024
@sangee2004 sangee2004 changed the title UI - Setting workspace from UI does not take effect UI - Changing workspace from UI does not take effect Jun 27, 2024
@thedadams
Copy link
Contributor

PR: #575

@thedadams
Copy link
Contributor

@sangee2004 The changes to fix this issue have been merged.

As state in Slack, you should be able to reproduce this issue (and then verify the fix) by doing something like

GPTSCRIPT_WORKSPACE_DIR=/some/other/path gptscript --workspace /my/workspace my-script.gpt

If the my-script.gpt uses the workspace context, then it will use /some/other/path instead of the /my/workspace, which is not correct.

@sangee2004
Copy link
Contributor Author

Tested with gptscript version - v0.0.0-dev-91751200-dirty

Changing workspace from within UI works as expected.

User is not allowed to override the workspace by setting GPTSCRIPT_WORKSPACE_DIR anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI Issues relating to "--ui" option
Projects
None yet
Development

No branches or pull requests

2 participants