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

Fix: Make top-level tool a context #67

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion tool.gpt
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
Name: Knowledge
Description: Create a knowledge base from files in the workspace directory and retrieve information from it.
Type: context
Share Tools: local-knowledge-retriever
Share Context: github.com/gptscript-ai/context/workspace

#!sys.echo

You have access to an ad-hoc RAG tool named local-knowledge-retriever. It will ingest files in the workspace on-the-fly and query them. Use it to answer questions from the user. If the answers it returns seem irrelevant, you can use other tools. When you give answers, always give a proper citation to the best of your abilities. ALWAYS prefer this tool over the read tool.

---
Name: local-knowledge-retriever
Description: Create a knowledge base from files in the workspace directory and retrieve information from it.
Context: github.com/gptscript-ai/context/workspace
Credential: github.com/gptscript-ai/credential as sys.openai with OPENAI_API_KEY as env and "Please provide your OpenAI API key" as message and key as field
Args: query: The query to search for in the knowledge directory.

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

---
name: retrieval
Expand Down