Harrison/memory docs (#195)

update memory docs and change variables
This commit is contained in:
Harrison Chase
2022-11-26 05:58:54 -08:00
committed by GitHub
parent f18a08f58d
commit 08deed9002
8 changed files with 73 additions and 51 deletions
+5 -7
View File
@@ -7,7 +7,7 @@
"source": [
"# Adding Memory To an LLMChain\n",
"\n",
"This notebook goes over how to use the Memory class with an arbitrary chain. For the purposes of this walkthrough, we will add `ConversationBufferMemory` to a `LLMChain`."
"This notebook goes over how to use the Memory class with an LLMChain. For the purposes of this walkthrough, we will add the `ConversationBufferMemory` class, although this can be any memory class."
]
},
{
@@ -46,7 +46,7 @@
" input_variables=[\"chat_history\", \"human_input\"], \n",
" template=template\n",
")\n",
"memory = ConversationBufferMemory(dynamic_key=\"chat_history\")"
"memory = ConversationBufferMemory(memory_key=\"chat_history\")"
]
},
{
@@ -90,7 +90,7 @@
{
"data": {
"text/plain": [
"'\\n\\nHi there my friend! Thank you for talking with me.'"
"' Hi there!'"
]
},
"execution_count": 4,
@@ -120,9 +120,7 @@
"\n",
"\n",
"Human: Hi there my friend\n",
"AI: \n",
"\n",
"Hi there my friend! Thank you for talking with me.\n",
"AI: Hi there!\n",
"Human: Not to bad - how are you?\n",
"Chatbot:\u001b[0m\n",
"\n",
@@ -132,7 +130,7 @@
{
"data": {
"text/plain": [
"\"\\n\\nI'm doing well, thank you for asking. How about you?\""
"\"\\n\\nI'm doing well, thanks for asking. How about you?\""
]
},
"execution_count": 5,