langchain/templates/llama2-functions/llama2-functions.ipynb

53 lines
1.1 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "9faf648c-541e-4368-82a8-96287dbf34de",
"metadata": {},
"source": [
"## Run Template\n",
"\n",
"In `server.py`, set -\n",
"```\n",
"add_routes(app, chain_ext, path=\"/llama2_functions\")\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
2023-10-30 18:27:44 +00:00
"id": "2dfe28bb-6112-459b-a77d-013964b65409",
"metadata": {},
"outputs": [],
"source": [
"from langserve.client import RemoteRunnable\n",
2023-10-30 18:32:31 +00:00
"\n",
2023-10-29 22:50:09 +00:00
"llama2_function = RemoteRunnable(\"http://0.0.0.0:8001/llama2_functions\")\n",
2023-10-30 18:32:31 +00:00
"llama2_function.invoke({\"question\": \"How does agent memory work?\"})"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
}
},
"nbformat": 4,
"nbformat_minor": 5
}