llm_wire/google

Configures the built-in Google Gemini GenerateContent adapter.

let config = google.new(api_key) |> google.config

The adapter targets https://generativelanguage.googleapis.com/v1beta. Gemini’s signed parts travel in each assistant turn’s provider_data and must be replayed unchanged. Structured output is sent as generationConfig.responseJsonSchema, which also takes what strict providers refuse: optional fields, codec.nullable, number ranges, pairs and codec.value(). The key is held in a closure and never prints.

Types

pub opaque type Options

Values

pub fn config(options: Options) -> llm_wire.Config

The configuration of Gemini calls, with the default limits and timeouts.

pub fn new(api_key: String) -> Options

Options for the API key api_key, trimmed.

pub fn with_api_version(
  options: Options,
  version: String,
) -> Options

Send this x-goog-api-version header.

✨ Search Document