From 359d22016230295d0fba8b2f2e831c309dd8bbc3 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Fri, 7 Nov 2025 10:32:27 -0500 Subject: [PATCH] Document a `OpenAIRealtimeLLMService` gotcha in an example. --- examples/foundational/19-openai-realtime.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/foundational/19-openai-realtime.py b/examples/foundational/19-openai-realtime.py index 31af47bf9..dca28b9fb 100644 --- a/examples/foundational/19-openai-realtime.py +++ b/examples/foundational/19-openai-realtime.py @@ -231,7 +231,12 @@ Remember, your responses should be short. Just one or two sentences, usually. Re standard_tools=[weather_function, restaurant_function, get_news_function] ) await task.queue_frames([LLMSetToolsFrame(tools=new_tools)]) - # Alternative pattern, useful if you're changing other session properties too + # Alternative pattern, useful if you're changing other session properties, too. + # (Though note that tools in your LLMContext take precedence over those + # in session properties, so if you have context-provided tools, prefer + # LLMSetToolsFrame instead, as it updates your context. Ditto for + # updating system instructions: send an LLMMessagesUpdateFrame with + # context messages updated with your new desired system message.) # await task.queue_frames( # [LLMUpdateSettingsFrame(settings=SessionProperties(tools=new_tools).model_dump())] # )