diff --git a/examples/canonical-metrics/bot.py b/examples/canonical-metrics/bot.py index 0d31f1df5..d14f4149e 100644 --- a/examples/canonical-metrics/bot.py +++ b/examples/canonical-metrics/bot.py @@ -72,7 +72,7 @@ async def main(): # voice_id="gD1IexrzCvsXPHUuT0s3", ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/chatbot-audio-recording/bot.py b/examples/chatbot-audio-recording/bot.py index 5fa6f5aaa..c3e20ecfe 100644 --- a/examples/chatbot-audio-recording/bot.py +++ b/examples/chatbot-audio-recording/bot.py @@ -95,7 +95,7 @@ async def main(): # voice_id="gD1IexrzCvsXPHUuT0s3", ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/deployment/flyio-example/bot.py b/examples/deployment/flyio-example/bot.py index 83e058434..7e5bef3ee 100644 --- a/examples/deployment/flyio-example/bot.py +++ b/examples/deployment/flyio-example/bot.py @@ -53,7 +53,7 @@ async def main(room_url: str, token: str): voice_id=os.getenv("ELEVENLABS_VOICE_ID", ""), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/deployment/modal-example/bot.py b/examples/deployment/modal-example/bot.py index 1c4423c10..327c6a5e4 100644 --- a/examples/deployment/modal-example/bot.py +++ b/examples/deployment/modal-example/bot.py @@ -43,7 +43,7 @@ async def main(room_url: str, token: str): api_key=os.getenv("CARTESIA_API_KEY", ""), voice_id="71a7ad14-091c-4e8e-a314-022ece01c121" ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/deployment/pipecat-cloud-example/bot.py b/examples/deployment/pipecat-cloud-example/bot.py index 4e2ddfbd4..d86c7f575 100644 --- a/examples/deployment/pipecat-cloud-example/bot.py +++ b/examples/deployment/pipecat-cloud-example/bot.py @@ -61,7 +61,7 @@ async def main(room_url: str, token: str): api_key=os.getenv("CARTESIA_API_KEY"), voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22" ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/02-llm-say-one-thing.py b/examples/foundational/02-llm-say-one-thing.py index 84651499b..94d2b27f7 100644 --- a/examples/foundational/02-llm-say-one-thing.py +++ b/examples/foundational/02-llm-say-one-thing.py @@ -38,7 +38,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/05-sync-speech-and-image.py b/examples/foundational/05-sync-speech-and-image.py index 2213089c8..9021dbf54 100644 --- a/examples/foundational/05-sync-speech-and-image.py +++ b/examples/foundational/05-sync-speech-and-image.py @@ -85,7 +85,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): # Create an HTTP session for API calls async with aiohttp.ClientSession() as session: - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) tts = CartesiaHttpTTSService( api_key=os.getenv("CARTESIA_API_KEY"), diff --git a/examples/foundational/05a-local-sync-speech-and-image.py b/examples/foundational/05a-local-sync-speech-and-image.py index 4a7b32ba7..77486d247 100644 --- a/examples/foundational/05a-local-sync-speech-and-image.py +++ b/examples/foundational/05a-local-sync-speech-and-image.py @@ -93,7 +93,7 @@ async def main(): self.frame = frame await self.push_frame(frame, direction) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) tts = CartesiaHttpTTSService( api_key=os.getenv("CARTESIA_API_KEY"), diff --git a/examples/foundational/06-listen-and-respond.py b/examples/foundational/06-listen-and-respond.py index 9d197d3e3..c41c39748 100644 --- a/examples/foundational/06-listen-and-respond.py +++ b/examples/foundational/06-listen-and-respond.py @@ -73,7 +73,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) ml = MetricsLogger() diff --git a/examples/foundational/06a-image-sync.py b/examples/foundational/06a-image-sync.py index 17f42578e..8ebe5400c 100644 --- a/examples/foundational/06a-image-sync.py +++ b/examples/foundational/06a-image-sync.py @@ -91,7 +91,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07-interruptible.py b/examples/foundational/07-interruptible.py index 34b24a748..a94dfad4b 100644 --- a/examples/foundational/07-interruptible.py +++ b/examples/foundational/07-interruptible.py @@ -45,7 +45,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07a-interruptible-vad.py b/examples/foundational/07a-interruptible-vad.py index af1e64916..a146ad636 100644 --- a/examples/foundational/07a-interruptible-vad.py +++ b/examples/foundational/07a-interruptible-vad.py @@ -44,7 +44,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07c-interruptible-deepgram-vad.py b/examples/foundational/07c-interruptible-deepgram-vad.py index 118b46ec3..366644be6 100644 --- a/examples/foundational/07c-interruptible-deepgram-vad.py +++ b/examples/foundational/07c-interruptible-deepgram-vad.py @@ -48,7 +48,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): tts = DeepgramTTSService(api_key=os.getenv("DEEPGRAM_API_KEY"), voice="aura-helios-en") - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07c-interruptible-deepgram.py b/examples/foundational/07c-interruptible-deepgram.py index 6b5cdcce0..12081480d 100644 --- a/examples/foundational/07c-interruptible-deepgram.py +++ b/examples/foundational/07c-interruptible-deepgram.py @@ -42,7 +42,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): tts = DeepgramTTSService(api_key=os.getenv("DEEPGRAM_API_KEY"), voice="aura-helios-en") - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07d-interruptible-elevenlabs-http.py b/examples/foundational/07d-interruptible-elevenlabs-http.py index 42590254d..4984897bc 100644 --- a/examples/foundational/07d-interruptible-elevenlabs-http.py +++ b/examples/foundational/07d-interruptible-elevenlabs-http.py @@ -49,7 +49,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): aiohttp_session=session, ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07d-interruptible-elevenlabs.py b/examples/foundational/07d-interruptible-elevenlabs.py index 27dd5cd72..fe31c12b7 100644 --- a/examples/foundational/07d-interruptible-elevenlabs.py +++ b/examples/foundational/07d-interruptible-elevenlabs.py @@ -45,7 +45,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id=os.getenv("ELEVENLABS_VOICE_ID", ""), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07e-interruptible-playht-http.py b/examples/foundational/07e-interruptible-playht-http.py index c7d18083a..394fff2ce 100644 --- a/examples/foundational/07e-interruptible-playht-http.py +++ b/examples/foundational/07e-interruptible-playht-http.py @@ -46,7 +46,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_url="s3://voice-cloning-zero-shot/d9ff78ba-d016-47f6-b0ef-dd630f59414e/female-cs/manifest.json", ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07e-interruptible-playht.py b/examples/foundational/07e-interruptible-playht.py index 952ff0a76..a1b5dddf9 100644 --- a/examples/foundational/07e-interruptible-playht.py +++ b/examples/foundational/07e-interruptible-playht.py @@ -48,7 +48,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): params=PlayHTTTSService.InputParams(language=Language.EN), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07g-interruptible-openai.py b/examples/foundational/07g-interruptible-openai.py index 931b5fc5e..3bc019ad1 100644 --- a/examples/foundational/07g-interruptible-openai.py +++ b/examples/foundational/07g-interruptible-openai.py @@ -46,7 +46,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): tts = OpenAITTSService(api_key=os.getenv("OPENAI_API_KEY"), voice="ballad") - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07h-interruptible-openpipe.py b/examples/foundational/07h-interruptible-openpipe.py index 4574198aa..633e0cf15 100644 --- a/examples/foundational/07h-interruptible-openpipe.py +++ b/examples/foundational/07h-interruptible-openpipe.py @@ -50,7 +50,6 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): llm = OpenPipeLLMService( api_key=os.getenv("OPENAI_API_KEY"), openpipe_api_key=os.getenv("OPENPIPE_API_KEY"), - model="gpt-4.1", tags={"conversation_id": f"pipecat-{timestamp}"}, ) diff --git a/examples/foundational/07i-interruptible-xtts.py b/examples/foundational/07i-interruptible-xtts.py index a4ae4f2be..aa64425fd 100644 --- a/examples/foundational/07i-interruptible-xtts.py +++ b/examples/foundational/07i-interruptible-xtts.py @@ -49,7 +49,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): base_url="http://localhost:8000", ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07j-interruptible-gladia.py b/examples/foundational/07j-interruptible-gladia.py index 1d526db48..4ed903ea6 100644 --- a/examples/foundational/07j-interruptible-gladia.py +++ b/examples/foundational/07j-interruptible-gladia.py @@ -54,7 +54,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY", ""), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY", "")) messages = [ { diff --git a/examples/foundational/07k-interruptible-lmnt.py b/examples/foundational/07k-interruptible-lmnt.py index 65129e7ce..092e4758f 100644 --- a/examples/foundational/07k-interruptible-lmnt.py +++ b/examples/foundational/07k-interruptible-lmnt.py @@ -42,7 +42,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): tts = LmntTTSService(api_key=os.getenv("LMNT_API_KEY"), voice_id="morgan") - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07m-interruptible-polly.py b/examples/foundational/07m-interruptible-polly.py index 83b13fbaa..6fe09619d 100644 --- a/examples/foundational/07m-interruptible-polly.py +++ b/examples/foundational/07m-interruptible-polly.py @@ -48,7 +48,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): params=PollyTTSService.InputParams(engine="neural", language="en-GB", rate="1.05"), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07o-interruptible-assemblyai.py b/examples/foundational/07o-interruptible-assemblyai.py index 2302aa97c..137060651 100644 --- a/examples/foundational/07o-interruptible-assemblyai.py +++ b/examples/foundational/07o-interruptible-assemblyai.py @@ -47,7 +47,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07p-interruptible-krisp.py b/examples/foundational/07p-interruptible-krisp.py index 399f52f3b..1f650363e 100644 --- a/examples/foundational/07p-interruptible-krisp.py +++ b/examples/foundational/07p-interruptible-krisp.py @@ -44,7 +44,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): tts = DeepgramTTSService(api_key=os.getenv("DEEPGRAM_API_KEY"), voice="aura-helios-en") - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07q-interruptible-rime-http.py b/examples/foundational/07q-interruptible-rime-http.py index df2166d69..c5dedf63a 100644 --- a/examples/foundational/07q-interruptible-rime-http.py +++ b/examples/foundational/07q-interruptible-rime-http.py @@ -49,7 +49,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): aiohttp_session=session, ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07q-interruptible-rime.py b/examples/foundational/07q-interruptible-rime.py index 8d836ba01..3df39ef6c 100644 --- a/examples/foundational/07q-interruptible-rime.py +++ b/examples/foundational/07q-interruptible-rime.py @@ -45,7 +45,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="rex", ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07t-interruptible-fish.py b/examples/foundational/07t-interruptible-fish.py index a5827a704..160bbddaf 100644 --- a/examples/foundational/07t-interruptible-fish.py +++ b/examples/foundational/07t-interruptible-fish.py @@ -45,7 +45,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): model="4ce7e917cedd4bc2bb2e6ff3a46acaa1", # Barack Obama ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07v-interruptible-neuphonic-http.py b/examples/foundational/07v-interruptible-neuphonic-http.py index a1f57d5f4..f1db00454 100644 --- a/examples/foundational/07v-interruptible-neuphonic-http.py +++ b/examples/foundational/07v-interruptible-neuphonic-http.py @@ -45,7 +45,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="fc854436-2dac-4d21-aa69-ae17b54e98eb", # Emily ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07v-interruptible-neuphonic.py b/examples/foundational/07v-interruptible-neuphonic.py index f566c285c..25df4e2e6 100644 --- a/examples/foundational/07v-interruptible-neuphonic.py +++ b/examples/foundational/07v-interruptible-neuphonic.py @@ -45,7 +45,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="fc854436-2dac-4d21-aa69-ae17b54e98eb", # Emily ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07w-interruptible-fal.py b/examples/foundational/07w-interruptible-fal.py index 26e22f2bf..6c1b71937 100644 --- a/examples/foundational/07w-interruptible-fal.py +++ b/examples/foundational/07w-interruptible-fal.py @@ -47,7 +47,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/07x-interruptible-local.py b/examples/foundational/07x-interruptible-local.py index bc9620cec..5027e8bcb 100644 --- a/examples/foundational/07x-interruptible-local.py +++ b/examples/foundational/07x-interruptible-local.py @@ -45,7 +45,7 @@ async def main(): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/10-wake-phrase.py b/examples/foundational/10-wake-phrase.py index 8b0b746e7..4fb19343d 100644 --- a/examples/foundational/10-wake-phrase.py +++ b/examples/foundational/10-wake-phrase.py @@ -47,7 +47,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/11-sound-effects.py b/examples/foundational/11-sound-effects.py index 5a900f78a..4a70d15d1 100644 --- a/examples/foundational/11-sound-effects.py +++ b/examples/foundational/11-sound-effects.py @@ -93,7 +93,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), diff --git a/examples/foundational/12b-describe-video-gpt-4o.py b/examples/foundational/12b-describe-video-gpt-4o.py index 7958edabc..c676390cc 100644 --- a/examples/foundational/12b-describe-video-gpt-4o.py +++ b/examples/foundational/12b-describe-video-gpt-4o.py @@ -74,7 +74,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) # OpenAI GPT-4o for vision analysis - openai = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + openai = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), diff --git a/examples/foundational/14-function-calling.py b/examples/foundational/14-function-calling.py index fbc2e11e8..31a6417f4 100644 --- a/examples/foundational/14-function-calling.py +++ b/examples/foundational/14-function-calling.py @@ -53,7 +53,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # You can also register a function_name of None to get all functions # sent to the same callback with an additional function_name parameter. diff --git a/examples/foundational/14d-function-calling-video.py b/examples/foundational/14d-function-calling-video.py index a3840ca2d..e51dc96dd 100644 --- a/examples/foundational/14d-function-calling-video.py +++ b/examples/foundational/14d-function-calling-video.py @@ -82,7 +82,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) llm.register_function("get_weather", get_weather) llm.register_function("get_image", get_image) diff --git a/examples/foundational/15-switch-voices.py b/examples/foundational/15-switch-voices.py index cf93d8858..14aeab76a 100644 --- a/examples/foundational/15-switch-voices.py +++ b/examples/foundational/15-switch-voices.py @@ -83,7 +83,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="a0e99841-438c-4a64-b679-ae501e7d6091", # Barbershop Man ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) llm.register_function("switch_voice", switch_voice) tools = [ diff --git a/examples/foundational/15a-switch-languages.py b/examples/foundational/15a-switch-languages.py index 2b9449242..de89721db 100644 --- a/examples/foundational/15a-switch-languages.py +++ b/examples/foundational/15a-switch-languages.py @@ -73,7 +73,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="d4db5fb9-f44b-4bd1-85fa-192e0f0d75f9", # Spanish-speaking Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) llm.register_function("switch_language", switch_language) tools = [ diff --git a/examples/foundational/16-gpu-container-local-bot.py b/examples/foundational/16-gpu-container-local-bot.py index 16ea36cf1..4853764fc 100644 --- a/examples/foundational/16-gpu-container-local-bot.py +++ b/examples/foundational/16-gpu-container-local-bot.py @@ -54,7 +54,6 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): llm = OpenAILLMService( # To use OpenAI # api_key=os.getenv("OPENAI_API_KEY"), - # model="gpt-4.1" # Or, to use a local vLLM (or similar) api server model="meta-llama/Meta-Llama-3-8B-Instruct", base_url="http://0.0.0.0:8000/v1", diff --git a/examples/foundational/17-detect-user-idle.py b/examples/foundational/17-detect-user-idle.py index 1bed5361a..2f1652a0f 100644 --- a/examples/foundational/17-detect-user-idle.py +++ b/examples/foundational/17-detect-user-idle.py @@ -47,7 +47,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/20a-persistent-context-openai.py b/examples/foundational/20a-persistent-context-openai.py index 07a94a944..bba3fc00e 100644 --- a/examples/foundational/20a-persistent-context-openai.py +++ b/examples/foundational/20a-persistent-context-openai.py @@ -185,7 +185,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # you can either register a single function for all function calls, or specific functions # llm.register_function(None, fetch_weather_from_api) diff --git a/examples/foundational/22-natural-conversation.py b/examples/foundational/22-natural-conversation.py index f53ea551c..0878d4831 100644 --- a/examples/foundational/22-natural-conversation.py +++ b/examples/foundational/22-natural-conversation.py @@ -56,7 +56,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): # statement. This doesn't really need to be an LLM, we could use NLP # libraries for that, but it was easier as an example because we # leverage the context aggregators. - statement_llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + statement_llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) statement_messages = [ { @@ -69,7 +69,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): statement_context_aggregator = statement_llm.create_context_aggregator(statement_context) # This is the regular LLM. - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/22b-natural-conversation-proposal.py b/examples/foundational/22b-natural-conversation-proposal.py index feae4c922..b6e89556f 100644 --- a/examples/foundational/22b-natural-conversation-proposal.py +++ b/examples/foundational/22b-natural-conversation-proposal.py @@ -224,10 +224,10 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): # This is the LLM that will be used to detect if the user has finished a # statement. This doesn't really need to be an LLM, we could use NLP # libraries for that, but we have the machinery to use an LLM, so we might as well! - statement_llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + statement_llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # This is the regular LLM. - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # You can also register a function_name of None to get all functions # sent to the same callback with an additional function_name parameter. llm.register_function("get_current_weather", fetch_weather_from_api) diff --git a/examples/foundational/22c-natural-conversation-mixed-llms.py b/examples/foundational/22c-natural-conversation-mixed-llms.py index dc24565d6..e6b0d0df7 100644 --- a/examples/foundational/22c-natural-conversation-mixed-llms.py +++ b/examples/foundational/22c-natural-conversation-mixed-llms.py @@ -428,16 +428,10 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): # This is the LLM that will be used to detect if the user has finished a # statement. This doesn't really need to be an LLM, we could use NLP # libraries for that, but we have the machinery to use an LLM, so we might as well! - statement_llm = AnthropicLLMService( - api_key=os.getenv("ANTHROPIC_API_KEY"), - model="claude-3-5-sonnet-20241022", - ) + statement_llm = AnthropicLLMService(api_key=os.getenv("ANTHROPIC_API_KEY")) # This is the regular LLM. - llm = OpenAILLMService( - api_key=os.getenv("OPENAI_API_KEY"), - model="gpt-4.1", - ) + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # Register a function_name of None to get all functions # sent to the same callback with an additional function_name parameter. llm.register_function("get_current_weather", fetch_weather_from_api) diff --git a/examples/foundational/23-bot-background-sound-daily.py b/examples/foundational/23-bot-background-sound-daily.py index f0a298bcc..97947d768 100644 --- a/examples/foundational/23-bot-background-sound-daily.py +++ b/examples/foundational/23-bot-background-sound-daily.py @@ -62,7 +62,7 @@ async def main(): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/23-bot-background-sound-p2p.py b/examples/foundational/23-bot-background-sound-p2p.py index b046f2e83..f18c58971 100644 --- a/examples/foundational/23-bot-background-sound-p2p.py +++ b/examples/foundational/23-bot-background-sound-p2p.py @@ -69,7 +69,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/24-stt-mute-filter.py b/examples/foundational/24-stt-mute-filter.py index 66dbb1267..98f054143 100644 --- a/examples/foundational/24-stt-mute-filter.py +++ b/examples/foundational/24-stt-mute-filter.py @@ -64,7 +64,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): tts = DeepgramTTSService(api_key=os.getenv("DEEPGRAM_API_KEY"), voice="aura-helios-en") - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) llm.register_function("get_current_weather", fetch_weather_from_api) weather_function = FunctionSchema( diff --git a/examples/foundational/28-transcription-processor.py b/examples/foundational/28-transcription-processor.py index ee49e35f9..42e31d5f6 100644 --- a/examples/foundational/28-transcription-processor.py +++ b/examples/foundational/28-transcription-processor.py @@ -109,10 +109,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService( - api_key=os.getenv("OPENAI_API_KEY"), - model="gpt-4.1", - ) + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/29-livekit-audio-chat.py b/examples/foundational/29-livekit-audio-chat.py index bf22db4c7..b8d44deb7 100644 --- a/examples/foundational/29-livekit-audio-chat.py +++ b/examples/foundational/29-livekit-audio-chat.py @@ -127,7 +127,7 @@ async def main(): ), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), diff --git a/examples/foundational/30-observer.py b/examples/foundational/30-observer.py index 98a794c3a..ad11f2267 100644 --- a/examples/foundational/30-observer.py +++ b/examples/foundational/30-observer.py @@ -88,7 +88,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/foundational/35-pattern-pair-voice-switching.py b/examples/foundational/35-pattern-pair-voice-switching.py index 63ca604e1..aadbe0cc3 100644 --- a/examples/foundational/35-pattern-pair-voice-switching.py +++ b/examples/foundational/35-pattern-pair-voice-switching.py @@ -120,7 +120,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): ) # Initialize LLM - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # System prompt for storytelling with voice switching system_prompt = """You are an engaging storyteller that uses different voices to bring stories to life. diff --git a/examples/foundational/36-user-email-gathering.py b/examples/foundational/36-user-email-gathering.py index 767584740..39958ce79 100644 --- a/examples/foundational/36-user-email-gathering.py +++ b/examples/foundational/36-user-email-gathering.py @@ -63,7 +63,7 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection): # aiohttp_session=session, # ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # You can aslo register a function_name of None to get all functions # sent to the same callback with an additional function_name parameter. llm.register_function("store_user_emails", store_user_emails) diff --git a/examples/moondream-chatbot/bot.py b/examples/moondream-chatbot/bot.py index ec19f3de4..87bc7e5fc 100644 --- a/examples/moondream-chatbot/bot.py +++ b/examples/moondream-chatbot/bot.py @@ -156,7 +156,7 @@ async def main(): voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) ta = TalkingAnimation() diff --git a/examples/patient-intake/bot.py b/examples/patient-intake/bot.py index fba48531e..64bb11743 100644 --- a/examples/patient-intake/bot.py +++ b/examples/patient-intake/bot.py @@ -324,7 +324,7 @@ async def main(): # voice_id="846d6cb0-2301-48b6-9683-48f5618ea2f6", # Spanish-speaking Lady # ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [] context = OpenAILLMContext(messages=messages) diff --git a/examples/phone-chatbot/bot_twilio.py b/examples/phone-chatbot/bot_twilio.py index 2022bd8f0..9f7740320 100644 --- a/examples/phone-chatbot/bot_twilio.py +++ b/examples/phone-chatbot/bot_twilio.py @@ -60,7 +60,7 @@ async def main(room_url: str, token: str, callId: str, sipUri: str): voice_id=os.getenv("ELEVENLABS_VOICE_ID", ""), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/phone-chatbot/call_transfer.py b/examples/phone-chatbot/call_transfer.py index ccb762efa..487391c67 100644 --- a/examples/phone-chatbot/call_transfer.py +++ b/examples/phone-chatbot/call_transfer.py @@ -305,7 +305,7 @@ async def main( tools = ToolsSchema(standard_tools=[terminate_call_function, dial_operator_function]) # Initialize LLM - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # Register functions with the LLM llm.register_function( diff --git a/examples/phone-chatbot/simple_dialin.py b/examples/phone-chatbot/simple_dialin.py index faa6a9d4f..dee51f865 100644 --- a/examples/phone-chatbot/simple_dialin.py +++ b/examples/phone-chatbot/simple_dialin.py @@ -129,7 +129,7 @@ async def main( system_instruction = """You are Chatbot, a friendly, helpful robot. Your goal is to demonstrate your capabilities in a succinct way. Your output will be converted to audio so don't include special characters in your answers. Respond to what the user said in a creative and helpful way, but keep your responses brief. Start by introducing yourself. If the user ends the conversation, **IMMEDIATELY** call the `terminate_call` function. """ # Initialize LLM - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # Register functions with the LLM llm.register_function("terminate_call", terminate_call) diff --git a/examples/phone-chatbot/simple_dialout.py b/examples/phone-chatbot/simple_dialout.py index 08610c760..6b15d3af8 100644 --- a/examples/phone-chatbot/simple_dialout.py +++ b/examples/phone-chatbot/simple_dialout.py @@ -101,7 +101,7 @@ async def main( system_instruction = """You are Chatbot, a friendly, helpful robot. Your goal is to demonstrate your capabilities in a succinct way. Your output will be converted to audio so don't include special characters in your answers. Respond to what the user said in a creative and helpful way, but keep your responses brief. Start by introducing yourself. If the user ends the conversation, **IMMEDIATELY** call the `terminate_call` function. """ # Initialize LLM - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # Register functions with the LLM llm.register_function("terminate_call", terminate_call) diff --git a/examples/sentry-metrics/bot.py b/examples/sentry-metrics/bot.py index 452d47c6e..853911f2b 100644 --- a/examples/sentry-metrics/bot.py +++ b/examples/sentry-metrics/bot.py @@ -63,7 +63,6 @@ async def main(): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - model="gpt-4.1", metrics=SentryMetrics(), ) diff --git a/examples/simple-chatbot/server/bot-openai.py b/examples/simple-chatbot/server/bot-openai.py index 23aee786d..70f813f52 100644 --- a/examples/simple-chatbot/server/bot-openai.py +++ b/examples/simple-chatbot/server/bot-openai.py @@ -155,7 +155,7 @@ async def main(): ) # Initialize LLM service - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) messages = [ { diff --git a/examples/telnyx-chatbot/bot.py b/examples/telnyx-chatbot/bot.py index a568ca150..861aa1c7a 100644 --- a/examples/telnyx-chatbot/bot.py +++ b/examples/telnyx-chatbot/bot.py @@ -48,7 +48,7 @@ async def run_bot( ), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) diff --git a/examples/translation-chatbot/bot.py b/examples/translation-chatbot/bot.py index 93e1c93c8..b7611e3a3 100644 --- a/examples/translation-chatbot/bot.py +++ b/examples/translation-chatbot/bot.py @@ -150,7 +150,7 @@ async def main(): in_language = "English" out_language = "Spanish" - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) context = OpenAILLMContext() context_aggregator = llm.create_context_aggregator(context) diff --git a/examples/twilio-chatbot/bot.py b/examples/twilio-chatbot/bot.py index f2cf02e8e..9b1501aaf 100644 --- a/examples/twilio-chatbot/bot.py +++ b/examples/twilio-chatbot/bot.py @@ -68,7 +68,7 @@ async def run_bot(websocket_client: WebSocket, stream_sid: str, testing: bool): ), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"), audio_passthrough=True) diff --git a/examples/twilio-chatbot/client.py b/examples/twilio-chatbot/client.py index 6142e25b1..97cca0cd0 100644 --- a/examples/twilio-chatbot/client.py +++ b/examples/twilio-chatbot/client.py @@ -98,7 +98,7 @@ async def run_client(client_name: str, server_url: str, duration_secs: int): ), ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # We let the audio passthrough so we can record the conversation. stt = DeepgramSTTService( diff --git a/examples/websocket-server/bot.py b/examples/websocket-server/bot.py index ebd72a336..2f08f8b43 100644 --- a/examples/websocket-server/bot.py +++ b/examples/websocket-server/bot.py @@ -91,7 +91,7 @@ async def main(): ) ) - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) diff --git a/tests/integration/test_integration_unified_function_calling.py b/tests/integration/test_integration_unified_function_calling.py index a8155e957..09611fd3a 100644 --- a/tests/integration/test_integration_unified_function_calling.py +++ b/tests/integration/test_integration_unified_function_calling.py @@ -80,7 +80,7 @@ async def _test_llm_function_calling(llm: LLMService): @pytest.mark.skipif(os.getenv("OPENAI_API_KEY") is None, reason="OPENAI_API_KEY is not set") @pytest.mark.asyncio async def test_unified_function_calling_openai(): - llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1") + llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY")) # This will fail if an exception is raised await _test_llm_function_calling(llm)