diff --git a/env.example b/env.example index 00b5fa775..3723fbf26 100644 --- a/env.example +++ b/env.example @@ -80,9 +80,6 @@ GOOGLE_TEST_CREDENTIALS=... # Gradium GRAPDIUM_API_KEY=... -# Grok -GROK_API_KEY=... - # Groq GROQ_API_KEY=... @@ -215,3 +212,6 @@ WHATSAPP_TOKEN=... WHATSAPP_WEBHOOK_VERIFICATION_TOKEN=... WHATSAPP_PHONE_NUMBER_ID=... WHATSAPP_APP_SECRET=... + +# xAI / Grok +XAI_API_KEY=... \ No newline at end of file diff --git a/examples/foundational/07e-interruptible-xai.py b/examples/foundational/07e-interruptible-xai.py index 8a19a1570..6d0d54e79 100644 --- a/examples/foundational/07e-interruptible-xai.py +++ b/examples/foundational/07e-interruptible-xai.py @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) tts = XAIHttpTTSService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), aiohttp_session=session, settings=XAIHttpTTSService.Settings( voice="eve", @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) llm = GrokLLMService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), settings=GrokLLMService.Settings( system_instruction="You are a helpful assistant in a voice conversation. Your responses will be spoken aloud, so avoid emojis, bullet points, or other formatting that can't be spoken. Respond to what the user said in a creative, helpful, and brief way.", ), diff --git a/examples/foundational/14g-function-calling-grok.py b/examples/foundational/14g-function-calling-grok.py index df94fa2f8..05e1efaf9 100644 --- a/examples/foundational/14g-function-calling-grok.py +++ b/examples/foundational/14g-function-calling-grok.py @@ -65,7 +65,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) tts = XAIHttpTTSService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), aiohttp_session=session, settings=XAIHttpTTSService.Settings( voice="eve", @@ -73,7 +73,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) llm = GrokLLMService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), settings=GrokLLMService.Settings( system_instruction="You are a helpful assistant in a voice conversation. Your responses will be spoken aloud, so avoid emojis, bullet points, or other formatting that can't be spoken. Respond to what the user said in a creative, helpful, and brief way.", ), diff --git a/examples/foundational/20f-persistent-context-grok-realtime.py b/examples/foundational/20f-persistent-context-grok-realtime.py index ed4a4d273..9942550e6 100644 --- a/examples/foundational/20f-persistent-context-grok-realtime.py +++ b/examples/foundational/20f-persistent-context-grok-realtime.py @@ -192,7 +192,7 @@ Remember, your responses should be short - just one or two sentences usually.""" ) llm = GrokRealtimeLLMService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), session_properties=session_properties, ) diff --git a/examples/foundational/51-grok-realtime.py b/examples/foundational/51-grok-realtime.py index 5c4ac7d96..3f1543871 100644 --- a/examples/foundational/51-grok-realtime.py +++ b/examples/foundational/51-grok-realtime.py @@ -179,7 +179,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Create the Grok Realtime LLM service llm = GrokRealtimeLLMService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), settings=GrokRealtimeLLMService.Settings( system_instruction="""You are a helpful and friendly AI assistant powered by Grok. diff --git a/examples/foundational/55zo-update-settings-grok-realtime.py b/examples/foundational/55zo-update-settings-grok-realtime.py index 9e853420e..304ccce8e 100644 --- a/examples/foundational/55zo-update-settings-grok-realtime.py +++ b/examples/foundational/55zo-update-settings-grok-realtime.py @@ -50,7 +50,7 @@ transport_params = { async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info(f"Starting bot") - llm = GrokRealtimeLLMService(api_key=os.getenv("GROK_API_KEY")) + llm = GrokRealtimeLLMService(api_key=os.getenv("XAI_API_KEY")) messages = [ { diff --git a/examples/foundational/55zza-update-settings-grok-llm.py b/examples/foundational/55zza-update-settings-grok-llm.py index 04cd39a95..dedb7b950 100644 --- a/examples/foundational/55zza-update-settings-grok-llm.py +++ b/examples/foundational/55zza-update-settings-grok-llm.py @@ -60,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) llm = GrokLLMService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), settings=GrokLLMService.Settings( system_instruction="You are a helpful assistant in a voice conversation. Your responses will be spoken aloud, so avoid emojis, bullet points, or other formatting that can't be spoken. Respond to what the user said in a creative, helpful, and brief way.", ),