Skip to content

Commit 718b0ec

Browse files
committed
Remove function calling code in different section
1 parent 71ab044 commit 718b0ec

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

gemini/multimodal-live-api/intro_multimodal_live_api_genai_sdk.ipynb

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -319,53 +319,6 @@
319319
" display(Markdown(f\"**Response >** {''.join(response)}\"))"
320320
]
321321
},
322-
{
323-
"cell_type": "code",
324-
"execution_count": null,
325-
"metadata": {
326-
"id": "a715adea5343"
327-
},
328-
"outputs": [],
329-
"source": [
330-
"get_current_weather = FunctionDeclaration(\n",
331-
" name=\"get_current_weather\",\n",
332-
" description=\"Get current weather in the given location\",\n",
333-
" parameters={\n",
334-
" \"type\": \"OBJECT\",\n",
335-
" \"properties\": {\n",
336-
" \"location\": {\n",
337-
" \"type\": \"STRING\",\n",
338-
" },\n",
339-
" },\n",
340-
" },\n",
341-
")\n",
342-
"\n",
343-
"config = LiveConnectConfig(\n",
344-
" response_modalities=[\"TEXT\"],\n",
345-
" tools=[get_current_weather],\n",
346-
")\n",
347-
"\n",
348-
"async with client.aio.live.connect(\n",
349-
" model=MODEL_ID,\n",
350-
" config=config,\n",
351-
") as session:\n",
352-
" text_input = \"Get the current weather in Santa Clara, San Jose and Mountain View\"\n",
353-
" display(Markdown(f\"**Input:** {text_input}\"))\n",
354-
"\n",
355-
" await session.send(input=text_input, end_of_turn=True)\n",
356-
"\n",
357-
" response = []\n",
358-
"\n",
359-
" async for message in session.receive():\n",
360-
" print(message)\n",
361-
" if message.text:\n",
362-
" response.append(message.text)\n",
363-
" if message.tool_call:\n",
364-
" print(message.function_response)\n",
365-
"\n",
366-
" display(Markdown(f\"**Response >** {''.join(response)}\"))"
367-
]
368-
},
369322
{
370323
"cell_type": "markdown",
371324
"metadata": {

0 commit comments

Comments
 (0)