Skip to content
1 min read · 298 words

@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

InterfaceDescription
GeminiContentA single entry in the contents array of a generateContent request.
GeminiEditOptionsPer-call options accepted by @nhtio/adk/batteries/generation/gemini/adapter!GeminiGenerationAdapter.edit.
GeminiGenerateContentRequestBodyThe JSON request body POSTed to /models/{model}:generateContent.
GeminiGenerateContentResponseThe relevant subset of the /models/{model}:generateContent JSON response shape.
GeminiGenerateOptionsPer-call options accepted by @nhtio/adk/batteries/generation/gemini/adapter!GeminiGenerationAdapter.generate.
GeminiGenerationAdapterOptionsConstructor options for @nhtio/adk/batteries/generation/gemini/adapter!GeminiGenerationAdapter.
GeminiGenerationConfigThe generationConfig block of a generateContent request.

Type Aliases

Type AliasDescription
GeminiRequestPartA 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.
GeminiResponseModalityThe 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.
GeminiResponsePartA 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