models/chat_models library
Classes
- AIModel
- Represents an AI model with its metadata
- ChatMessage
- A single message in a chat conversation.
- ContentBlock
- Simple interface for provider-specific blocks
- FileMessage
- File message for documents, audio, video, etc.
- FileMime
- General MIME type for files
- FunctionCall
- FunctionCall contains details about which function to call and with what arguments.
- ImageMessage
- An image message
- ImageUrlMessage
- An image URL message
- MessageBuilder
- Message builder for creating messages with provider-specific extensions
- MessageType
- The type of a message in a chat conversation.
- RequestMetadata
- Request metadata for tracking and analytics
- TextMessage
- A text message
- ToolCall
- Tool call represents a function call that an LLM wants to make.
- ToolResultMessage
- Tool result message
- ToolsBlock
- Tools block for storing tools in messages This allows tools to be cached and processed by providers
- ToolUseMessage
- A tool use message
- UniversalTextBlock
- Universal text block that works with all providers
Enums
- ChatRole
- Role of a participant in a chat conversation.
- ImageMime
- The supported MIME type of an image.
- ReasoningEffort
- Reasoning effort levels for models that support reasoning
- ServiceTier
- Service tier levels for API requests
- Verbosity
- Verbosity levels for controlling output detail (GPT-5 feature)