Skip to main content

Module llm

Module llm 

Source

Modules§

anthropic
gemini
openai
registry
retry

Structs§

FunctionCall
FunctionDefinition
ImageUrl
Image URL/data struct used by ContentPart::ImageUrl.
LlmResponse
Message
A single message in the LLM conversation history.
NullLlmProvider
No-op LLM provider for unit tests.
ToolCall
ToolDefinition
Usage
Token usage statistics returned by the LLM API after a completion. Used for cost tracking and context window management. The API populates this only when stream_options.include_usage is set to true.

Enums§

ContentPart
A single part of a message’s content.
Role

Traits§

LlmProvider

Functions§

image_to_content_part
Load an image file from disk and return a ContentPart::ImageUrl carrying a base64 data URI (data:<mime>;base64,<encoded>).