From 5d11f08a851a98654459af490bc54b72c2127c6c Mon Sep 17 00:00:00 2001 From: Daishan Peng Date: Tue, 17 Sep 2024 15:20:36 -0700 Subject: [PATCH] Fix: make script_id and thread_id optional Signed-off-by: Daishan Peng --- gateway/tool.gpt | 4 ++-- tool.gpt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gateway/tool.gpt b/gateway/tool.gpt index 3ea6a64..69eea99 100644 --- a/gateway/tool.gpt +++ b/gateway/tool.gpt @@ -20,7 +20,7 @@ Credential: github.com/gptscript-ai/gateway-creds as github.com/gptscript-ai/gat Param: query: The query to search for in the knowledge base. It will be used for semantic similarity search, so enhance it accordingly to yield good results. Param: debug: (OPTIONAL) Set to "true" to enable debug mode - only use if you are explicitly asked to do so. -#!${KNOWLEDGE_BIN} retrieve --dataset ${GPTSCRIPT_THREAD_ID} --dataset ${GPTSCRIPT_SCRIPT_ID} "${GPTSCRIPT_INPUT}" +#!${KNOWLEDGE_BIN} retrieve ${GPTSCRIPT_THREAD_ID:+--dataset ${GPTSCRIPT_THREAD_ID}} ${GPTSCRIPT_SCRIPT_ID:+--dataset ${GPTSCRIPT_SCRIPT_ID}} "${GPTSCRIPT_INPUT}" --- Name: Knowledge Retrieval Context @@ -30,7 +30,7 @@ Type: context Input Filter: QueryRelevancy Output Filter: KnowledgeInstructions -#!${KNOWLEDGE_BIN} retrieve --debug --flows-file=blueprint:context --dataset ${GPTSCRIPT_THREAD_ID} --dataset ${GPTSCRIPT_SCRIPT_ID} "${GPTSCRIPT_INPUT}" +#!${KNOWLEDGE_BIN} retrieve --debug --flows-file=blueprint:context ${GPTSCRIPT_THREAD_ID:+--dataset ${GPTSCRIPT_THREAD_ID}} ${GPTSCRIPT_SCRIPT_ID:+--dataset ${GPTSCRIPT_SCRIPT_ID}} "${GPTSCRIPT_INPUT}" --- Name: QueryRelevancy diff --git a/tool.gpt b/tool.gpt index 590b750..5bcf65b 100644 --- a/tool.gpt +++ b/tool.gpt @@ -20,7 +20,7 @@ Credential: github.com/gptscript-ai/gateway-creds as github.com/gptscript-ai/gat Param: query: The query to search for in the knowledge base. It will be used for semantic similarity search, so enhance it accordingly to yield good results. Param: debug: (OPTIONAL) Set to "true" to enable debug mode - only use if you are explicitly asked to do so. -#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool retrieve --dataset ${GPTSCRIPT_THREAD_ID} --dataset ${GPTSCRIPT_SCRIPT_ID} "${GPTSCRIPT_INPUT}" +#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool retrieve ${GPTSCRIPT_THREAD_ID:+--dataset ${GPTSCRIPT_THREAD_ID}} ${GPTSCRIPT_SCRIPT_ID:+--dataset ${GPTSCRIPT_SCRIPT_ID}} "${GPTSCRIPT_INPUT}" --- Name: Knowledge Retrieval Context @@ -30,7 +30,7 @@ Type: context Input Filter: QueryRelevancy Output Filter: KnowledgeInstructions -#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool retrieve --dataset ${GPTSCRIPT_THREAD_ID} --dataset ${GPTSCRIPT_SCRIPT_ID} "${GPTSCRIPT_INPUT}" +#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool retrieve ${GPTSCRIPT_THREAD_ID:+--dataset ${GPTSCRIPT_THREAD_ID}} ${GPTSCRIPT_SCRIPT_ID:+--dataset ${GPTSCRIPT_SCRIPT_ID}} "${GPTSCRIPT_INPUT}" --- Name: QueryRelevancy