docs: update cloud how-tos (#747)

This commit is contained in:
Vadym Barda
2024-06-21 14:04:25 -04:00
committed by GitHub
parent f8e7221cae
commit c99b63b9d8
9 changed files with 387 additions and 1759 deletions
@@ -28,7 +28,7 @@
"outputs": [],
"source": [
"client = get_client()\n",
"assistant = await client.assistants.create(\"agent\")\n",
"assistant_id = \"agent\"\n",
"thread = await client.threads.create()"
]
},
@@ -41,7 +41,7 @@
"# this run will be interrupted\n",
"first_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",
")"
]
@@ -54,7 +54,7 @@
"source": [
"second_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 nyc?\"}]},\n",
" multitask_strategy=\"enqueue\",\n",
")"
@@ -175,10 +175,14 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "",
"name": ""
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}