Module types

Module types 

Source
Expand description

Core types for LLM requests and responses.

This module defines standardized types that are used across all providers, including request/response structures, messages, and common data types.

Structs§

ChatRequest
A chat request containing messages and parameters.
ChatRequestBuilder
Builder for ChatRequest
CompletionRequest
A completion request for non-chat text generation.
Embedding
An embedding vector.
Function
Definition of a function that can be called.
FunctionCall
A function call within a tool call.
GeneratedImage
A generated image.
ImageRequest
Request for image generation.
Message
A message in a conversation.
Metadata
Metadata for requests, including provider-specific extensions.
Parameters
Common parameters used across providers.
SpeechToTextRequest
Request for speech-to-text conversion.
TextToSpeechRequest
Request for text-to-speech conversion.
Tool
Definition of a tool/function that can be called.
ToolCall
A tool/function call made by the AI.
ToolContent
Tool-related message content.
Usage
Usage statistics for a request.

Enums§

ContentPart
A part of multimodal message content.
FinishReason
Reason why the model stopped generating.
ImageSource
MessageContent
Content of a message, which can be text or multimodal.
Role
The role of a message sender.

Traits§

ChatResponse
Trait for chat response types.
CompletionResponse
Trait for completion response types.
ImageResponse
Trait for image generation response types.
SpeechToTextResponse
Trait for speech-to-text response types.
TextToSpeechResponse
Trait for text-to-speech response types.