Expand description
Protocol-neutral data model and conversion contracts used by unllm.
Structs§
- Asset
Lease - A temporary provider-managed asset and its cleanup token.
- Candidate
- A model candidate.
- Capabilities
- Capabilities supported by an adapter or configured route.
- Conversion
Context - Context applied to a single conversion.
- Conversion
Outcome - A successfully converted value and its non-fatal diagnostics.
- Diagnostic
- A stable diagnostic emitted during conversion.
- Disabled
Media Resolver - Resolver used when network media fetching is disabled.
- Embed
Request - A normalized embedding request.
- Embed
Response - A normalized embedding response.
- Embedding
- A single embedding vector.
- Generate
Request - A normalized generation request.
- Generate
Response - A normalized generation response.
- Generation
Parameters - Common generation controls.
- Image
Request - A normalized image request.
- Image
Response - A normalized image response.
- Instruction
- A high-priority instruction kept separate from conversation messages.
- Media
Asset - A media value used by multimodal inputs and outputs.
- Message
- A conversation message.
- Reasoning
Config - Common reasoning controls.
- Request
Envelope - Versioned serialized request contract.
- Response
Envelope - Versioned serialized response contract.
- Staging
Request - Describes why an asset needs to be staged at a provider.
- Stream
Accumulator - Reconstructs a useful complete response from normalized events.
- Stream
Event Envelope - Versioned serialized stream event contract.
- Tool
Call - A completed tool call.
- Tool
Definition - A portable function declaration.
- Tool
Result - A completed tool result.
- Unllm
Error - A normalized error safe to encode for another protocol.
- Usage
- Token usage reported by an upstream provider.
Enums§
- Annotation
- A portable response annotation.
- Capability
- A capability that may be advertised by an adapter or route.
- Content
Delta - A typed incremental content payload.
- Content
Part - A typed content item.
- Conversion
Mode - Conversion behavior when the target cannot represent source semantics.
- Diagnostic
Severity - Diagnostic severity.
- Embedding
Input - Input accepted by the embedding operation.
- Error
Kind - Stable high-level error categories used by the gateway.
- Finish
Reason - A normalized finish reason.
- Image
Task - Image operation details.
- Instruction
Kind - The kind of high-priority instruction.
- Media
Source - The backing source of a media asset.
- Operation
- A top-level inference operation.
- Protocol
- A protocol understood by unllm.
- Response
Format - Structured output preference.
- Role
- A message author role.
- Stream
Event - A normalized streaming event.
- Tool
Choice - Tool selection policy.
- Unified
Request - Any normalized request.
- Unified
Response - Any normalized response.
Constants§
- SCHEMA_
VERSION - The version of the canonical JSON envelope emitted by this crate.
Traits§
- Asset
Stager - Stages media in a provider-managed file service.
- DynAdapter
- An object-safe protocol codec used for runtime dispatch.
- Media
Resolver - Resolves remote media into another supported representation.
Functions§
- convert_
request - Converts a complete request between two protocol adapters through the canonical model.
- convert_
response - Converts a complete response between two protocol adapters through the canonical model.
- convert_
stream_ event - Converts one stream event between two protocol adapters.
Type Aliases§
- Event
Stream - Runtime-neutral boxed stream of normalized events.
- Extensions
- Arbitrary JSON values keyed by provider namespace.