docs: Update multimodal example

This commit is contained in:
Andrei Betlen 2024-02-26 11:34:45 -05:00
parent bf315ee7a9
commit 79c649c2d1

View file

@ -11,14 +11,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": 13,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"{'text': 'Llama +'}\n" "{'text': 'Llama C++'}\n"
] ]
} }
], ],
@ -42,7 +42,17 @@
" ],\n", " ],\n",
" }\n", " }\n",
" ],\n", " ],\n",
" response_format={ \"type\": \"json_object\" }\n", " response_format={ \n",
" \"type\": \"json_object\",\n",
" \"schema\": {\n",
" \"type\": \"object\",\n",
" \"properties\": {\n",
" \"text\": {\n",
" \"type\": \"string\"\n",
" }\n",
" }\n",
" }\n",
" }\n",
")\n", ")\n",
"import json\n", "import json\n",
"print(json.loads(response.choices[0].message.content))" "print(json.loads(response.choices[0].message.content))"