From 19cf95d8c7af42a530972b85c067ef8409ad9797 Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 27 Jun 2024 22:33:34 +0000 Subject: [PATCH] feat: agent rag use `documents` field other than `embeddings` dir --- Argcfile.sh | 4 ++-- README.md | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Argcfile.sh b/Argcfile.sh index a6e6e13..05b9cfb 100644 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -235,7 +235,7 @@ build-bin@agent() { echo "Build agent $name" fi done - if [[ "$found" = "false" ]]; then + if [[ "$found" == "false" ]] && [[ ! -d "$agent_dir" ]]; then not_found_agents+=("$name") fi done @@ -276,7 +276,7 @@ build-declarations@agent() { echo "$json_data" > "$declarations_file" fi done - if [[ "$found" == "false" ]]; then + if [[ "$found" == "false" ]] && [[ ! -d "$agent_dir" ]]; then not_found_agents+=("$name") fi done diff --git a/README.md b/README.md index bdf5fdd..dafad10 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,6 @@ The agent has the following folder structure: ``` └── agents └── myagent - ├── embeddings/ # Contains RAG files for knowledge ├── functions.json # Function declarations file (Auto-generated) ├── index.yaml # Agent definition file └── tools.{sh,js,py} # Agent tools script @@ -145,6 +144,8 @@ version: v0.1.0 instructions: You are a test ai agent to ... conversation_starters: - What can you do? +documents: + - files/doc.pdf ``` Refer to `./agents/todo-{sh,js,py}` for examples of how to implement a agent.