diff --git a/server/services/llm/grok.mdx b/server/services/llm/grok.mdx index 0fd8620f..95e7f452 100644 --- a/server/services/llm/grok.mdx +++ b/server/services/llm/grok.mdx @@ -11,7 +11,7 @@ description: "LLM service implementation using Grok's API with OpenAI-compatible Pipecat's API methods for Grok integration @@ -89,7 +89,7 @@ This service uses the same settings as `OpenAILLMService`. See [OpenAI LLM Setti ```python import os -from pipecat.services.grok import GrokLLMService +from pipecat.services.xai.llm import GrokLLMService llm = GrokLLMService( api_key=os.getenv("XAI_API_KEY"), @@ -100,7 +100,7 @@ llm = GrokLLMService( ### With Custom Settings ```python -from pipecat.services.grok import GrokLLMService +from pipecat.services.xai.llm import GrokLLMService llm = GrokLLMService( api_key=os.getenv("XAI_API_KEY"), diff --git a/server/services/s2s/grok.mdx b/server/services/s2s/grok.mdx index 873f72d0..3478f183 100644 --- a/server/services/s2s/grok.mdx +++ b/server/services/s2s/grok.mdx @@ -11,7 +11,7 @@ description: "Real-time speech-to-speech service implementation using xAI's Grok Pipecat's API methods for Grok Realtime integration @@ -55,7 +55,7 @@ Before using Grok Realtime services, you need: ### Required Environment Variables -- `GROK_API_KEY`: Your xAI API key for authentication +- `XAI_API_KEY`: Your xAI API key for authentication ### Key Features @@ -158,18 +158,18 @@ Grok provides several built-in tools in addition to custom function tools: ```python import os -from pipecat.services.grok.realtime import GrokRealtimeLLMService +from pipecat.services.xai.realtime.llm import GrokRealtimeLLMService llm = GrokRealtimeLLMService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), ) ``` ### With Session Configuration ```python -from pipecat.services.grok.realtime import GrokRealtimeLLMService -from pipecat.services.grok.realtime.events import ( +from pipecat.services.xai.realtime.llm import GrokRealtimeLLMService +from pipecat.services.xai.realtime.events import ( SessionProperties, TurnDetection, AudioConfiguration, @@ -189,7 +189,7 @@ session_properties = SessionProperties( ) llm = GrokRealtimeLLMService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), settings=GrokRealtimeLLMService.Settings( session_properties=session_properties, ), @@ -199,15 +199,15 @@ llm = GrokRealtimeLLMService( ### With Built-in Tools ```python -from pipecat.services.grok.realtime import GrokRealtimeLLMService -from pipecat.services.grok.realtime.events import ( +from pipecat.services.xai.realtime.llm import GrokRealtimeLLMService +from pipecat.services.xai.realtime.events import ( SessionProperties, WebSearchTool, XSearchTool, ) llm = GrokRealtimeLLMService( - api_key=os.getenv("GROK_API_KEY"), + api_key=os.getenv("XAI_API_KEY"), settings=GrokRealtimeLLMService.Settings( session_properties=SessionProperties( instructions="You are a helpful assistant with access to web search.", @@ -225,8 +225,8 @@ llm = GrokRealtimeLLMService( ```python from pipecat.frames.frames import LLMUpdateSettingsFrame -from pipecat.services.grok.realtime.llm import GrokRealtimeLLMSettings -from pipecat.services.grok.realtime.events import SessionProperties +from pipecat.services.xai.realtime.llm import GrokRealtimeLLMSettings +from pipecat.services.xai.realtime.events import SessionProperties await task.queue_frame( LLMUpdateSettingsFrame(