|
|
@ -32,8 +32,8 @@
|
|
|
|
"outputs": [],
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"source": [
|
|
|
|
"memory = ConversationSummaryBufferMemory(llm=llm, max_token_limit=10)\n",
|
|
|
|
"memory = ConversationSummaryBufferMemory(llm=llm, max_token_limit=10)\n",
|
|
|
|
"memory.save_context({\"input\": \"hi\"}, {\"ouput\": \"whats up\"})\n",
|
|
|
|
"memory.save_context({\"input\": \"hi\"}, {\"output\": \"whats up\"})\n",
|
|
|
|
"memory.save_context({\"input\": \"not much you\"}, {\"ouput\": \"not much\"})"
|
|
|
|
"memory.save_context({\"input\": \"not much you\"}, {\"output\": \"not much\"})"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -73,8 +73,8 @@
|
|
|
|
"outputs": [],
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"source": [
|
|
|
|
"memory = ConversationSummaryBufferMemory(llm=llm, max_token_limit=10, return_messages=True)\n",
|
|
|
|
"memory = ConversationSummaryBufferMemory(llm=llm, max_token_limit=10, return_messages=True)\n",
|
|
|
|
"memory.save_context({\"input\": \"hi\"}, {\"ouput\": \"whats up\"})\n",
|
|
|
|
"memory.save_context({\"input\": \"hi\"}, {\"output\": \"whats up\"})\n",
|
|
|
|
"memory.save_context({\"input\": \"not much you\"}, {\"ouput\": \"not much\"})"
|
|
|
|
"memory.save_context({\"input\": \"not much you\"}, {\"output\": \"not much\"})"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|