From c6d759e043e382259b6ed6d02fda9dad270b12d5 Mon Sep 17 00:00:00 2001 From: James Hush Date: Fri, 9 May 2025 12:17:15 +0800 Subject: [PATCH] Save --- examples/foundational/25-google-audio-in.py | 23 ++++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/examples/foundational/25-google-audio-in.py b/examples/foundational/25-google-audio-in.py index eea8c5a2a..861b88117 100644 --- a/examples/foundational/25-google-audio-in.py +++ b/examples/foundational/25-google-audio-in.py @@ -34,6 +34,7 @@ from pipecat.processors.aggregators.openai_llm_context import ( from pipecat.processors.frame_processor import FrameProcessor from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.google.llm import GoogleLLMContext, GoogleLLMService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import TransportParams from pipecat.transports.network.small_webrtc import SmallWebRTCTransport from pipecat.transports.network.webrtc_connection import SmallWebRTCConnection @@ -286,16 +287,18 @@ async def run_bot(webrtc_connection: SmallWebRTCConnection, _: argparse.Namespac voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ) - conversation_llm = GoogleLLMService( - name="Conversation", - model="gemini-2.0-flash-001", - # model="gemini-exp-1121", - api_key=os.getenv("GOOGLE_API_KEY"), - # we can give the GoogleLLMService a system instruction to use directly - # in the GenerativeModel constructor. Let's do that rather than put - # our system message in the messages list. - system_instruction=conversation_system_message, - ) + # conversation_llm = GoogleLLMService( + # name="Conversation", + # model="gemini-2.0-flash-001", + # # model="gemini-exp-1121", + # api_key=os.getenv("GOOGLE_API_KEY"), + # # we can give the GoogleLLMService a system instruction to use directly + # # in the GenerativeModel constructor. Let's do that rather than put + # # our system message in the messages list. + # system_instruction=conversation_system_message, + # ) + + conversation_llm = OpenAILLMService(name="Conversation", api_key=os.getenv("OPENAI_API_KEY")) input_transcription_llm = GoogleLLMService( name="Transcription",