Module llm

Module llm 

Source
Expand description

LLM abstraction — decouples agents from specific model providers.

The BaseLlm trait provides a unified interface for generating content from any LLM. The GeminiLlm implementation wraps gemini-live’s Client for Gemini models.

Re-exports§

pub use gemini::GeminiLlm;
pub use gemini::GeminiLlmParams;
pub use registry::LlmRegistry;

Modules§

gemini
Concrete Gemini LLM implementation using gemini-live Client.
registry
LLM registry — pattern-based resolution of LLM providers.

Structs§

EnvTokenProvider
Default token provider — reads GOOGLE_ACCESS_TOKEN from environment.
GcloudTokenProvider
Token provider that shells out to gcloud auth print-access-token, caching the result with a configurable TTL.
LlmRequest
Configuration for an LLM generation request.
LlmResponse
The response from an LLM generation request.
ModelCapabilities
Capability declaration for a model — what callers may rely on without probing. See BaseLlm::capabilities.
TokenUsage
Token usage statistics.

Enums§

LlmError
Errors from LLM operations.

Traits§

BaseLlm
Trait for LLM providers — decouples agents from specific models.
TokenProvider
Provides access tokens for VertexAI authentication.