mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-07 02:07:52 +02:00
docs: update cloud how-tos (#747)
This commit is contained in:
@@ -28,24 +28,8 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"client = get_client()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"assistant = await client.assistants.create(\"agent\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"client = get_client()\n",
|
||||
"assistant_id = \"agent\"\n",
|
||||
"thread = await client.threads.create()"
|
||||
]
|
||||
},
|
||||
@@ -57,7 +41,7 @@
|
||||
"source": [
|
||||
"run = await client.runs.create(\n",
|
||||
" thread[\"thread_id\"],\n",
|
||||
" assistant[\"assistant_id\"],\n",
|
||||
" assistant_id,\n",
|
||||
" input={\"messages\": [{\"role\": \"human\", \"content\": \"what's the weather in sf?\"}]},\n",
|
||||
")"
|
||||
]
|
||||
@@ -80,7 +64,7 @@
|
||||
"try:\n",
|
||||
" await client.runs.create(\n",
|
||||
" thread[\"thread_id\"],\n",
|
||||
" assistant[\"assistant_id\"],\n",
|
||||
" assistant_id,\n",
|
||||
" input={\"messages\": [{\"role\": \"human\", \"content\": \"what's the weather in nyc?\"}]},\n",
|
||||
" multitask_strategy=\"reject\",\n",
|
||||
" )\n",
|
||||
@@ -163,10 +147,14 @@
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "",
|
||||
"name": ""
|
||||
},
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user