From 280691b1b380bc3f1d9178c8d55474045fba7317 Mon Sep 17 00:00:00 2001 From: Kwindla Hultman Kramer Date: Wed, 16 Oct 2024 14:27:48 -0700 Subject: [PATCH] explanatory comment in 19-openai-realtime-beta.py --- examples/foundational/19-openai-realtime-beta.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/foundational/19-openai-realtime-beta.py b/examples/foundational/19-openai-realtime-beta.py index 6a48de56d..41b0f418a 100644 --- a/examples/foundational/19-openai-realtime-beta.py +++ b/examples/foundational/19-openai-realtime-beta.py @@ -124,6 +124,9 @@ Remember, your responses should be short. Just one or two sentences, usually.""" # llm.register_function(None, fetch_weather_from_api) llm.register_function("get_current_weather", fetch_weather_from_api) + # Create a standard OpenAI LLM context object using the normal messages format. The + # OpenAIRealtimeBetaLLMService will convert this internally to messages that the + # openai WebSocket API can understand. context = OpenAILLMContext( [{"role": "user", "content": "Say hello!"}], # [{"role": "user", "content": [{"type": "text", "text": "Say hello!"}]}],