Updated readme.

This commit is contained in:
retoor 2025-01-20 06:50:48 +01:00
parent 7291c2a19a
commit 5416e5226c

View File

@ -112,6 +112,28 @@ messages = [
last_response =agent.communicate(messages) last_response =agent.communicate(messages)
``` ```
Messages are also allowed in this format:
```python
messages = [
dict(role="user",content="What is your name?"),
dict(role="assistant",content="My name is Hans."),
]
agent.communicate(messages)
```
You can add many messages of the same role with giving role as parameter.
```python
messages = [
"I am Hans,",
"I have many apples.",
"I do not have many oranges.",
"Wizards are cool.",
]
agent.communicate(messages,role="assistant")
```
## Add embeddings / documents / RAG to your agent ## Add embeddings / documents / RAG to your agent
You can add context to your agent by adding documents to the vector store. You can add context to your agent by adding documents to the vector store.