@nhtio/adk/batteries/generation/gemini/types
Option and wire-shape types for the Gemini media generation adapter.
Remarks
Builds on the shared generation option base owned by the OpenAI Generation battery (@nhtio/adk/batteries/generation/openai/types!BaseGenerationAdapterOptions, @nhtio/adk/batteries/generation/openai/types!GenerateOptions, @nhtio/adk/batteries/generation/openai/types!EditOptions). This battery re-exports those shared shapes and extends them with the Gemini generativelanguage REST engine's own transport/wire fields — exactly how the transformers.js Embeddings battery extends the OpenAI Embeddings option type.
Interfaces
| Interface | Description |
|---|---|
| GeminiContent | A single entry in the contents array of a generateContent request. |
| GeminiEditOptions | Per-call options accepted by @nhtio/adk/batteries/generation/gemini/adapter!GeminiGenerationAdapter.edit. |
| GeminiGenerateContentRequestBody | The JSON request body POSTed to /models/{model}:generateContent. |
| GeminiGenerateContentResponse | The relevant subset of the /models/{model}:generateContent JSON response shape. |
| GeminiGenerateOptions | Per-call options accepted by @nhtio/adk/batteries/generation/gemini/adapter!GeminiGenerationAdapter.generate. |
| GeminiGenerationAdapterOptions | Constructor options for @nhtio/adk/batteries/generation/gemini/adapter!GeminiGenerationAdapter. |
| GeminiGenerationConfig | The generationConfig block of a generateContent request. |
Type Aliases
| Type Alias | Description |
|---|---|
| GeminiRequestPart | A single content part in a Gemini generateContent request. Requests always send camelCase inlineData — probe-confirmed to be accepted whether the request is routed through the LB or hits Google directly. |
| GeminiResponseModality | The response modalities Gemini is asked to return. 'IMAGE' is what actually yields generated media; 'TEXT' is included by default alongside it so refusal/safety text (when present) arrives in the same response instead of a separate call. |
| GeminiResponsePart | A single content part in a Gemini generateContent response. Tolerates both the canonical camelCase inlineData and a defensive snake_case inline_data — response-only tolerance; this battery's requests always send camelCase. |
References
BaseGenerationAdapterOptions
Re-exports BaseGenerationAdapterOptions
EditOptions
Re-exports EditOptions
GeneratedMediaOutput
Re-exports GeneratedMediaOutput
GenerateOptions
Re-exports GenerateOptions
GenerationRetryConfig
Re-exports GenerationRetryConfig