The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Harrison/update docs mem (#201)
Harrison Chased4e6b7a69210
diff --git a/docs/examples/memory.rst b/docs/examples/memory.rstnew file mode 100644index 0000000000..c5c064f88d--- /dev/null+++ b/docs/examples/memory.rst@@ -0,0 +1,11 @@+Memory+======++The examples here are all related to working with the concept of Memory in LangChain.++.. toctree::+ :maxdepth: 1+ :glob:+ :caption: Memory++ memory/*\ No newline at end of filediff --git a/docs/examples/memory/agent_with_memory.ipynb b/docs/examples/memory/agent_with_memory.ipynbindex 48c8533b26..fa93a7e0dc 100644--- a/docs/examples/memory/agent_with_memory.ipynb+++ b/docs/examples/memory/agent_with_memory.ipynb@@ -76,7 +76,7 @@" suffix=suffix, \n"," input_variables=[\"input\", \"chat_history\"]\n",")\n",- "memory = ConversationBufferMemory(dynamic_key=\"chat_history\")"+ "memory = ConversationBufferMemory(memory_key=\"chat_history\")"]},{diff --git a/docs/explanation/core_concepts.md b/docs/explanation/core_concepts.mdindex be4b8e2eeb..eafb6db07b 100644--- a/docs/explanation/core_concepts.md+++ b/docs/explanation/core_concepts.md@@ -29,3 +29,9 @@ They vary greatly in complexity and are combination of generic, highly configura## AgentsAs opposed to a chain, whether the steps to be taken are known ahead of time, agentsuse an LLM to determine which tools to call and in what order.++## Memory+By default, Chains and Agents are stateless, meaning that they treat each incoming query independently.+In some applications (chatbots being a GREAT example) it is highly important to remember previous interactions,+both at a short term but also at a long term level. The concept of "Memory" exists to do exactly that.+diff --git a/docs/getting_started/memory.ipynb b/docs/getting_started/memory.ipynbindex 402ac39c33..6b297f3c2b 100644--- a/docs/getting_started/memory.ipynb+++ b/docs/getting_started/memory.ipynb@@ -290,10 +290,20 @@"conversation_with_summary.predict(input=\"Very cool -- what is the scope of the project?\")"]},+ {+ "cell_type": "markdown",+ "id": "5c8735cc",+ "metadata": {},+ "source": [+ "### More Resources on Memory\n",+ "\n",+ "This just scratches the surface of what you can do with memory. For more examples on things like how to implement custom memory classes, how to add memory to a custom LLM chain and how to use memory with and agent, please see the [How-To: Memory](../../examples/memory) section."+ ]+ },{"cell_type": "code","execution_count": null,- "id": "0eb11bd0",+ "id": "436dda66","metadata": {},"outputs": [],"source": []diff --git a/docs/index.rst b/docs/index.rstindex b0418caa2c..5dc98488de 100644--- a/docs/index.rst+++ b/docs/index.rst@@ -120,6 +120,7 @@ Start here if you haven't used LangChain before.examples/integrations.rstexamples/chains.rstexamples/agents.rst+ examples/memory.rstexamples/model_laboratory.ipynbMore elaborate examples and walk-throughs of particular