Skip to main content

Module messages

Module messages 

Source
Expand description

OpenAI-compatible request/response shapes. Canonical wire format across all providers — adapters translate to/from provider-native formats.

Structs§

CacheControlConfig
Typed cache-control extracted from tt_extras.
ChatCompletionChunk
One SSE event from a streaming chat completion.
ChatCompletionRequest
ChatCompletionResponse
Choice
ChunkChoice
ChunkDelta
EmbeddingData
EmbeddingsRequest
EmbeddingsResponse
ImageUrl
InputAudio
ResponseFormat
Tool
ToolCall
ToolCallFunction
ToolChoiceFunction
ToolFunction

Enums§

CacheMode
Cache behaviour requested by the caller via tt_extras.cache.
ContentPart
EmbeddingInput
Message
MessageContent
ToolChoice

Functions§

parse_cache_control
Parse CacheControlConfig from a request’s tt_extras map.
parse_data_url
Parse a base64 data: URL into (media_type, base64_payload).