llm
Google Vertex AI LLM service implementation.
This module provides integration with Google’s AI models via Vertex AI, extending the GoogleLLMService with Vertex AI authentication.
- class pipecat.services.google.vertex.llm.GoogleVertexLLMSettings(model: str | None | _NotGiven = <factory>, extra: dict[str, Any]=<factory>, system_instruction: str | None | _NotGiven = <factory>, temperature: float | None | _NotGiven = <factory>, max_tokens: int | None | _NotGiven = <factory>, top_p: float | None | _NotGiven = <factory>, top_k: int | None | _NotGiven = <factory>, frequency_penalty: float | None | _NotGiven = <factory>, presence_penalty: float | None | _NotGiven = <factory>, seed: int | None | _NotGiven = <factory>, filter_incomplete_user_turns: bool | None | _NotGiven = <factory>, user_turn_completion_config: UserTurnCompletionConfig | None | _NotGiven = <factory>, thinking: GoogleLLMService.ThinkingConfig | None | _NotGiven = <factory>)[source]
Bases:
GoogleLLMSettingsSettings for GoogleVertexLLMService.
- class pipecat.services.google.vertex.llm.GoogleVertexLLMService(*, credentials: str | None = None, credentials_path: str | None = None, model: str | None = None, location: str = 'us-east4', project_id: str, params: InputParams | None = None, settings: GoogleVertexLLMSettings | None = None, system_instruction: str | None = None, tools: list | None = None, tool_config: dict | None = None, http_options: HttpOptions | None = None, **kwargs)[source]
Bases:
GoogleLLMServiceGoogle Vertex AI LLM service extending GoogleLLMService.
Provides access to Google’s AI models via Vertex AI while using the same Google AI client and message format as GoogleLLMService. Handles authentication using Google service account credentials and configures the client for Vertex AI endpoints.
- Settings
alias of
GoogleVertexLLMSettings
- __init__(*, credentials: str | None = None, credentials_path: str | None = None, model: str | None = None, location: str = 'us-east4', project_id: str, params: InputParams | None = None, settings: GoogleVertexLLMSettings | None = None, system_instruction: str | None = None, tools: list | None = None, tool_config: dict | None = None, http_options: HttpOptions | None = None, **kwargs)[source]
Initializes the VertexLLMService.
- Parameters:
credentials – JSON string of service account credentials.
credentials_path – Path to the service account JSON file.
model –
Model identifier (e.g., “gemini-2.5-flash”).
Deprecated since version 0.0.105: Use
settings=GoogleVertexLLMService.Settings(model=...)instead.location – GCP region for Vertex AI endpoint. Defaults to “us-east4”.
project_id – Google Cloud project ID.
params –
Input parameters for the model.
Deprecated since version 0.0.105: Use
settings=GoogleVertexLLMService.Settings(...)instead.settings – Runtime-updatable settings for this service. When both deprecated parameters and settings are provided, settings values take precedence.
system_instruction –
System instruction/prompt for the model.
Deprecated since version 0.0.105: Use
settings=GoogleVertexLLMService.Settings(system_instruction=...)instead.tools – List of available tools/functions.
tool_config – Configuration for tool usage.
http_options – HTTP options for the client.
**kwargs – Additional arguments passed to GoogleLLMService.