Skip to main content

Module types

Module types 

Source
Expand description

Core types: traits, messages, requests, responses, and errors

§Core Types

Self-contained type definitions for the CLI LLM runners library. These types mirror the LLM provider contract without requiring any external platform dependency.

Structs§

ChatMessage
A single message in a chat conversation
ChatRequest
Configuration for a chat completion request
ChatResponse
Response from a chat completion
ImagePart
An image attached to a chat message
LlmCapabilities
LLM provider capability flags using bitflags for efficient storage
RunnerError
Error type for CLI LLM runner operations
StreamChunk
A chunk of a streaming response
TokenUsage
Token usage statistics
ToolCallRequest
A tool call requested by the assistant
ToolDefinition
Definition of a tool that can be called by the model

Enums§

ErrorKind
Categories of errors produced by CLI runners
MessageRole
Role of a message in the conversation
ResponseFormat
Controls the response format from the model
ToolChoice
Controls which tools the model may call

Traits§

LlmProvider
LLM provider trait for chat completion

Type Aliases§

ChatStream
Stream type for chat completion responses