mirror of
https://github.com/microsoft/autogen.git
synced 2026-05-13 03:00:55 -04:00
Fix class name style in document (#5516)
Fixed a wrong class name style in the document and removed trailing whitespace. Co-authored-by: Wei Jen Lu <weijenlu@microsoft.com> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
This commit is contained in:
@@ -4,23 +4,23 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Memory \n",
|
||||
"## Memory\n",
|
||||
"\n",
|
||||
"There are several use cases where it is valuable to maintain a _store_ of useful facts that can be intelligently added to the context of the agent just before a specific step. The typically use case here is a RAG pattern where a query is used to retrieve relevant information from a database that is then added to the agent's context.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"AgentChat provides a {py:class}`~autogen_core.memory.Memory` protocol that can be extended to provide this functionality. The key methods are `query`, `update_context`, `add`, `clear`, and `close`. \n",
|
||||
"AgentChat provides a {py:class}`~autogen_core.memory.Memory` protocol that can be extended to provide this functionality. The key methods are `query`, `update_context`, `add`, `clear`, and `close`.\n",
|
||||
"\n",
|
||||
"- `add`: add new entries to the memory store\n",
|
||||
"- `query`: retrieve relevant information from the memory store \n",
|
||||
"- `update_context`: mutate an agent's internal `model_context` by adding the retrieved information (used in the {py:class}`~autogen_agentchat.agents.AssistantAgent` class) \n",
|
||||
"- `query`: retrieve relevant information from the memory store\n",
|
||||
"- `update_context`: mutate an agent's internal `model_context` by adding the retrieved information (used in the {py:class}`~autogen_agentchat.agents.AssistantAgent` class)\n",
|
||||
"- `clear`: clear all entries from the memory store\n",
|
||||
"- `close`: clean up any resources used by the memory store \n",
|
||||
"- `close`: clean up any resources used by the memory store\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"## ListMemory Example\n",
|
||||
"\n",
|
||||
"{py:class}~autogen_core.memory.ListMemory is provided as an example implementation of the {py:class}~autogen_core.memory.Memory protocol. It is a simple list-based memory implementation that maintains memories in chronological order, appending the most recent memories to the model's context. The implementation is designed to be straightforward and predictable, making it easy to understand and debug.\n",
|
||||
"{py:class}`~autogen_core.memory.ListMemory` is provided as an example implementation of the {py:class}`~autogen_core.memory.Memory protocol`. It is a simple list-based memory implementation that maintains memories in chronological order, appending the most recent memories to the model's context. The implementation is designed to be straightforward and predictable, making it easy to understand and debug.\n",
|
||||
"In the following example, we will use ListMemory to maintain a memory bank of user preferences and demonstrate how it can be used to provide consistent context for agent responses over time."
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user