Skip to main content

Module completion

Module completion 

Source
Expand description

Completion request, response streaming, and error types.

Structs§

CompletionRequest
A request to stream one completion from a model.
FinalResponse
Payload of StreamChunk::Final.
ToolDefinition
Definition of one tool the model may call.
Usage
Token usage reported by a provider for one completion.

Enums§

CompletionError
Error invoking a completion model.
ErrorClass
Provider-declared classification of a completion error, telling callers how to react. Classification is the provider’s job — it knows its own failure modes — so the agent runtime never has to parse error message strings.
StreamChunk
One streamed item of a completion response.
ToolCallDeltaContent
The content of a StreamChunk::ToolCallDelta.

Type Aliases§

ModelStream
The streaming response returned by a model invocation.