gptscript-ai / knowledge

Knowledge for GPTScript
https://gptscript-ai.github.io/knowledge/
Apache License 2.0
29 stars 14 forks source link

Files in sub directory are not ingested when knowledge tool is accessed as remote tool. #32

Closed sangee2004 closed 4 months ago

sangee2004 commented 4 months ago

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 using workspace that has k8s documentation - gptscript --workspace /Users/sangeethahariharan/k8sdoc/website/content/en/docs 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. knowledge tool is not able to provide any relevant information for any search query
Screenshot 2024-06-20 at 1 02 08 PM Screenshot 2024-06-20 at 1 03 04 PM

Search results are only from the file under the workspace directory and no sub directories are searched.

Expected Behavior: All files from sub directory should be ingested recursively by knowledge tool.

iwilltry42 commented 4 months ago

askdir and ingest are now recursive by default as per #29 - can you check again with a build from the main branch, please?

sangee2004 commented 4 months ago

Tested with knowledge as remote tool and able to see all files from subdirectory getting ingested. Able to get relevant information when chatting with the tool.