Working on the 46 example

This commit is contained in:
James Hush
2025-09-17 11:59:16 +08:00
parent 373a09ecd6
commit 29d4a56663

View File

@@ -247,10 +247,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
async def on_client_connected(transport, client): async def on_client_connected(transport, client):
logger.info("Client connected, sending greeting") logger.info("Client connected, sending greeting")
# Kick off the conversation by adding system message and running LLM # Kick off the conversation by adding system message and running LLM
messages.append({ messages.append(
"role": "system", {
"content": "Please introduce yourself to the user as an AI assistant coordinator who works with specialists for weather, trivia, and math topics." "role": "system",
}) "content": "Please introduce yourself to the user as an AI assistant coordinator who works with specialists for weather, trivia, and math topics.",
}
)
await task.queue_frames([LLMRunFrame()]) await task.queue_frames([LLMRunFrame()])
@transport.event_handler("on_client_disconnected") @transport.event_handler("on_client_disconnected")