langchain agents

This commit is contained in:
Yudhvir Singh
2023-08-26 14:00:31 -07:00
parent 2ce670e2f5
commit 9f6f96124e
2 changed files with 234 additions and 2 deletions

View File

@@ -71,13 +71,44 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "5b4b284b-6812-447f-958b-45ac6fb7e1da",
"metadata": {},
"outputs": [],
"source": [
"memory.save_context({},{})"
"memory.save_context({\"input\": \"Hello\"},{\"output\": \"Hi!\"})\n",
"memory.save_context({\"input\": \"How was your skii trip?\"},\n",
" {\"output\": f\"{skii_trip}\"})"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "6bb955b7-4197-4553-a1c3-7ff0e7e4e497",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'history': 'System: The human greets the AI and asks about its ski trip. The AI enthusiastically shares about its recent ski trip to Colorado, describing the breathtaking mountains and cozy ski lodge. The AI also mentions feeling nervous at first but receiving helpful instruction from ski instructors. The AI started with easier slopes to get familiar with the snow.'}"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"memory.load_memory_variables({})"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "52bbafdf-b562-41e3-ae04-09aebb1ca0c6",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {