aeat.adapters.outbound.llm._providers.gemini module¶
Google Gemini provider adapter for the LLM outbound subpackage.
Speaks the Gemini v1beta/models/{model}:generateContent HTTP API and
adapts its response shape to the
ProviderCompletion
contract. Internal pydantic models mirror the upstream JSON schema and are kept
private.
- class GeminiAdapter(api_key, timeout_s)[source]¶
Bases:
_ProviderAdapterProvider adapter that invokes the Gemini
generateContentHTTP API.A non-empty
api_keyis mandatory; the adapter refuses to construct without one because the underlying API rejects unauthenticated calls.-
provider:
LLMProvider¶
- async complete(request)[source]¶
Execute a Gemini completion request.
- Parameters:
request (
ProviderRequest) – Normalized provider request.- Return type:
- Returns:
A
ProviderCompletioncontaining the concatenated text of the first candidate and reported token counts.- Raises:
LLMProviderError – When the API returns a 4xx or 5xx HTTP error status.
-
provider: