gptscript-ai / gptscript

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

UI - Stuck in `Calling tool main...` after clicking "Allow" on tool prompt (knowledge) #582

Open sangee2004 opened 1 week ago

sangee2004 commented 1 week ago

gptscript version v0.0.0-dev-549082a6-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 with workspace option - gptscript --workspace /Users/sangeethahariharan/k8sdoc/website/content/en/docs --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. Once UI is launched , ask any K8s query like "provide me information about pod eviction"

Notice that after clicking the "Allow" on tool prompt (knowledge) , UI is stuck in this state for ever:

Screenshot 2024-06-27 at 4 37 40 PM

Note:

  1. When I run the same example in TUI , it works as expected. knowledge tool call succeeds and returns answers.
  2. When i run the same script with a different workspace that has only couple of files using UI , tool call to knowledge succeeds and is able to respond to queries. This issue seems very specific to this dataset.
tylerslaton commented 1 week ago

https://github.com/gptscript-ai/ui/pull/21

sangee2004 commented 6 days ago

When testing with latest ui builds , I am able to see the "View Stack Trace" option when LLM call is in progress.