Skip to main content Module message Copy item path Source Audio Audio content containing audio data and metadata about it. Document Document content containing document data and metadata about it. Image Image content containing image data and metadata about it. Reasoning Assistant reasoning payload with an optional provider-supplied identifier. Text Basic text content. ToolCall Describes a tool call with an id and function to call, generally produced by a provider. ToolFunction Describes a tool function to call with a name and arguments, generally produced by a provider. ToolResult Tool result content containing information about a tool call and it’s resulting content. Video Video content containing video data and metadata about it. AssistantContent Describes responses from a provider which is either text or a tool call. AudioMediaType Describes the audio media type of the content. Not every provider supports every media type.
Convertible to and from MIME type strings. ContentFormat Describes the format of the content, which can be base64 or string. DocumentMediaType Describes the document media type of the content. Not every provider supports every media type.
Includes also programming languages as document types for providers who support code running.
Convertible to and from MIME type strings. DocumentSourceKind The kind of image source (to be used). ImageDetail Describes the detail of the image content, which can be low, high, or auto (open-ai specific). ImageMediaType Describes the image media type of the content. Not every provider supports every media type.
Convertible to and from MIME type strings. MediaType Helper enum that tracks the media type of the content. Message A provider-agnostic chat message. MessageError Error type to represent issues with converting messages to and from specific provider messages. ReasoningContent A typed reasoning block used by providers that emit structured thinking data. ToolChoice ToolResultContent Describes the content of a tool result, which can be text or an image. UserContent Describes the content of a message, which can be text, a tool result, an image, audio, or
a document. Dependent on provider supporting the content type. Multimedia content is generally
base64 (defined by it’s format) encoded but additionally supports urls (for some providers). VideoMediaType Describes the video media type of the content. Not every provider supports every media type.
Convertible to and from MIME type strings. ConvertMessage A useful trait to help convert rig_core::completion::Message to your own message type. MimeType Trait for converting between MIME types and media types.