Expand description
LLM abstraction: params, requests/responses, and the registry.
Modules§
- gemini
- Concrete Gemini LLM implementation using gemini-live
Client. - registry
- LLM registry — pattern-based resolution of LLM providers.
Structs§
- EnvToken
Provider - Default token provider — reads
GOOGLE_ACCESS_TOKENfrom environment. - Gcloud
Token Provider - Token provider that shells out to
gcloud auth print-access-token, caching the result with a configurable TTL. - Gemini
Llm - Concrete Gemini LLM implementation using gemini-live
Client. - Gemini
LlmParams - Parameters for constructing a
GeminiLlm. - LlmRegistry
- Registry that maps model name patterns to LLM factory functions.
- LlmRequest
- Configuration for an LLM generation request.
- LlmResponse
- The response from an LLM generation request.
- MockLlm
- A
BaseLlmthat replies from a script or a closure and records every request, for tests that must not reach a provider. - Model
Capabilities - Capability declaration for a model — what callers may rely on without
probing. See
BaseLlm::capabilities. - Token
Usage - Token usage statistics.
Enums§
- LlmError
- Errors from LLM operations.
Traits§
- BaseLlm
- Trait for LLM providers — decouples agents from specific models.
- Token
Provider - Provides access tokens for VertexAI authentication.
Type Aliases§
- LlmStream
- A reply streamed in chunks; see
BaseLlm::generate_stream.