Skip to main content

Crate llm_api

Crate llm_api 

Source
Expand description

Canonical model invocation and continuation contract. No Agent or transport implementation.

Re-exports§

pub use service::Image;

Modules§

service

Structs§

Completion
Provider-neutral completion returned to Runtime.
CompletionRequest
One logical LLM invocation.
Continuation
Provider-issued replay data attached to exactly one completed model message. Adapters own the format and compatibility key. Callers must not synthesize or edit payloads.
Message
Provider-neutral conversation message.
ModelConstraints
Capabilities required by an invocation, without naming a provider or model.
ModelMode
Logical model mode selected by the product, independent of provider and model identifiers.
ModelProfile
Provider-neutral limits for one frozen logical model route.
TokenUsage
Normalized token accounting reported by an implementation.
ToolCall
Tool call returned by an LLM.
ToolDefinition
A callable function exposed to the model. Execution policy belongs to the caller.
UseCase
Logical model use case resolved by the deployment’s LLM implementation.

Enums§

ContentPart
One typed part of a model message.
FinishReason
Why a model invocation stopped.
MessageRole
Role of a message in a model conversation.

Constants§

MESSAGE_SCHEMA
Offline normative schema for persisted model messages.