From 8cce25d2d290e7886e84e9fc39cc4c0bbfb999c4 Mon Sep 17 00:00:00 2001 From: filipi87 Date: Fri, 10 Apr 2026 08:25:50 -0300 Subject: [PATCH] Fixing openai examples. --- .../function-calling/function-calling-openai-async-stream.py | 3 +++ examples/function-calling/function-calling-openai-async.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/function-calling/function-calling-openai-async-stream.py b/examples/function-calling/function-calling-openai-async-stream.py index fd2caaddf..b91a0eac1 100644 --- a/examples/function-calling/function-calling-openai-async-stream.py +++ b/examples/function-calling/function-calling-openai-async-stream.py @@ -187,6 +187,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): async def on_client_connected(transport, client): logger.info(f"Client connected") # Kick off the conversation. + context.add_message( + {"role": "developer", "content": "Please introduce yourself to the user."} + ) await task.queue_frames([LLMRunFrame()]) @transport.event_handler("on_client_disconnected") diff --git a/examples/function-calling/function-calling-openai-async.py b/examples/function-calling/function-calling-openai-async.py index 50efa25e9..79a4ccad0 100644 --- a/examples/function-calling/function-calling-openai-async.py +++ b/examples/function-calling/function-calling-openai-async.py @@ -171,6 +171,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): async def on_client_connected(transport, client): logger.info(f"Client connected") # Kick off the conversation. + context.add_message( + {"role": "developer", "content": "Please introduce yourself to the user."} + ) await task.queue_frames([LLMRunFrame()]) @transport.event_handler("on_client_disconnected")