From 5416e5226c6db67b3eeafce50ac0524770b8cfab Mon Sep 17 00:00:00 2001 From: retoor Date: Mon, 20 Jan 2025 06:50:48 +0100 Subject: [PATCH] Updated readme. --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index d7f4789..db9ea12 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,28 @@ 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 You can add context to your agent by adding documents to the vector store.