feat: agent rag use documents field other than embeddings dir (#51)
This commit is contained in:
+2
-2
@@ -235,7 +235,7 @@ build-bin@agent() {
|
|||||||
echo "Build agent $name"
|
echo "Build agent $name"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$found" = "false" ]]; then
|
if [[ "$found" == "false" ]] && [[ ! -d "$agent_dir" ]]; then
|
||||||
not_found_agents+=("$name")
|
not_found_agents+=("$name")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -276,7 +276,7 @@ build-declarations@agent() {
|
|||||||
echo "$json_data" > "$declarations_file"
|
echo "$json_data" > "$declarations_file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$found" == "false" ]]; then
|
if [[ "$found" == "false" ]] && [[ ! -d "$agent_dir" ]]; then
|
||||||
not_found_agents+=("$name")
|
not_found_agents+=("$name")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ The agent has the following folder structure:
|
|||||||
```
|
```
|
||||||
└── agents
|
└── agents
|
||||||
└── myagent
|
└── myagent
|
||||||
├── embeddings/ # Contains RAG files for knowledge
|
|
||||||
├── functions.json # Function declarations file (Auto-generated)
|
├── functions.json # Function declarations file (Auto-generated)
|
||||||
├── index.yaml # Agent definition file
|
├── index.yaml # Agent definition file
|
||||||
└── tools.{sh,js,py} # Agent tools script
|
└── tools.{sh,js,py} # Agent tools script
|
||||||
@@ -145,6 +144,8 @@ version: v0.1.0
|
|||||||
instructions: You are a test ai agent to ...
|
instructions: You are a test ai agent to ...
|
||||||
conversation_starters:
|
conversation_starters:
|
||||||
- What can you do?
|
- What can you do?
|
||||||
|
documents:
|
||||||
|
- files/doc.pdf
|
||||||
```
|
```
|
||||||
|
|
||||||
Refer to `./agents/todo-{sh,js,py}` for examples of how to implement a agent.
|
Refer to `./agents/todo-{sh,js,py}` for examples of how to implement a agent.
|
||||||
|
|||||||
Reference in New Issue
Block a user