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.