API Reference llm_call v#0.1.0

Copy Markdown View Source

Modules

Wire-protocol codec for LLM APIs.

Starts the default Finch pool.

What a completion protocol supports.

A provider, resolved for calling.

The behaviour every dialect adapter implements.

Fixture-based assertions for codec authors.

Codec metadata.

Codec defaults and capture policy.

Canonical content parts.

A document or file block.

An image block. source is a URL, base64 data, or a provider file id.

A provider block the codec does not understand.

A text block.

A reasoning block.

A video block, used for references and generated assets.

use for a completion adapter.

Anthropic Messages (POST /v1/messages).

Gemini generateContent / streamGenerateContent (v1beta).

Validation and encoding primitives shared by dialect adapters.

OpenAI Chat Completions (POST /v1/chat/completions).

OpenAI Responses (POST /v1/responses).

A WebSocket connection for OpenAI Responses (wss://…/v1/responses).

The lazy Enumerable over one Responses WebSocket lane.

A request rendered into one protocol's wire shape.

A codec error.

HTTP transport, backed by Finch.

Raised when a streaming call fails after LlmCall.stream/3 has returned.

One HTTP request, fully resolved by the client.

The JSON seam.

Namespace for the media adapters vendored with this library.

The media surface a codec declares.

The behaviour every media generation adapter implements.

Fixture-based assertions for media codec authors.

use for a media adapter.

Gemini Imagen image generation (POST /v1beta/models/{model}:predict).

MiniMax Hailuo video generation (v1).

OpenAI image generation (POST /v1/images/generations).

Seedance video generation (BytePlus ModelArk content generation tasks).

A provider-neutral image or video generation request.

The result of a media generation.

One user or assistant turn.

A long-running media generation job.

Declares a provider: where it lives, how it authenticates, and which codecs it serves.

Canonical reasoning controls.

The reasoning surface a codec and model accept.

A provider-neutral completion request.

A provider-neutral completion response.

Server-sent event framing.

A lazy Enumerable over a streaming call.

Turns streamed tool-call fragments into complete LlmCall.ToolCall values.

A stop reason, usage, or both, arriving mid-stream.

A provider payload the codec did not map to a canonical delta.

Incremental text.

Incremental reasoning text, a reasoning signature, or both.

A tool-call fragment.

A normalized streaming event.

Opaque per-codec streaming state.

A call the model asked for.

The result of a tool call, ready to send back to the model.

A tool the model may call.

Token accounting as reported by the provider.

The WebSocket transport contract.

Raised by a WebSocket stream when the session or the connection fails.

The default WebSocket transport, backed by Mint.WebSocket.