Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
Fix: change to use base workspace dir
Browse files Browse the repository at this point in the history
The use of the knowledge dir was a hold over from when we thought this
tool would be used in a different way. Now, I think just default to the
workspace is the right behavior.

Signed-off-by: Craig Jellick <[email protected]>
  • Loading branch information
cjellick committed Jun 14, 2024
1 parent d6593be commit 85b1a70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/askdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

type ClientAskDir struct {
Client
Path string `usage:"Path to the directory to query" short:"p" default:"./knowledge"`
Path string `usage:"Path to the directory to query" short:"p" default:"."`
ClientIngestOpts
ClientRetrieveOpts
ClientFlowsConfig
Expand Down
7 changes: 4 additions & 3 deletions tool.gpt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Description: Create a knowledge base from files in the ./knowledge directory and retrieve information from it.
Description: Create a knowledge base from files in the workspace directory and retrieve information from it.
Context: github.com/gptscript-ai/context/workspace
Args: query: The query to search for in the knowledge directory.

#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool askdir "${query}"
#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool askdir --path ${GPTSCRIPT_WORKSPACE_DIR} "${query}"

---
name: retrieval
description: A tool that queries the knowledge retrieval API to get similar documents from the Vector database. Response source texts with references that can be used for citations. It does not contain a generated answer, only source text.

args: prompt: The query prompt to ask the vector database. URL Encoded string.

#!http://${knowledge_retrieval_api_url}/datasets/${knowledge_retrieval_dataset}/retrieve
#!http://${knowledge_retrieval_api_url}/datasets/${knowledge_retrieval_dataset}/retrieve

0 comments on commit 85b1a70

Please sign in to comment.