# core.chat.messages

`core.chat.messages`

internal message representations of chat messages

## Classes

Name | Description
--- | ---
ChatFormattedChats | Chat formatted chats with formatter and optional train on inputs
Chats | top level data structure for chat conversations
MessageContentTypes | Message content types for text, image, audio, tool calls, and tool responses
MessageContents | Message contents with type, value, metadata, weight, newline, and end of contents
MessageRoles | Message roles for the system, user, assistant, and tools
Messages | Messages with role, content, metadata, weight, and chat formatting
PreferenceChats | representation for preference data for chat
SpecialToken | Special tokens for beginning of string and end of string
Tool | Tool with description, function, and parameters
ToolCallContents | Tool call contents with name, arguments, and optional id
ToolCallFunction | Tool call function with name and arguments
ToolResponseContents | Tool response contents with name, content, and optional id

### ChatFormattedChats

    core.chat.messages.ChatFormattedChats()

Chat formatted chats with formatter and optional train on inputs

### Chats

    core.chat.messages.Chats()

top level data structure for chat conversations

### MessageContentTypes

    core.chat.messages.MessageContentTypes()

Message content types for text, image, audio, tool calls, and tool responses

### MessageContents

    core.chat.messages.MessageContents()

Message contents with type, value, metadata, weight, newline, and end of contents

### MessageRoles

    core.chat.messages.MessageRoles()

Message roles for the system, user, assistant, and tools

### Messages

    core.chat.messages.Messages()

Messages with role, content, metadata, weight, and chat formatting

### PreferenceChats

    core.chat.messages.PreferenceChats()

representation for preference data for chat

### SpecialToken

    core.chat.messages.SpecialToken()

Special tokens for beginning of string and end of string

### Tool

    core.chat.messages.Tool()

Tool with description, function, and parameters

### ToolCallContents

    core.chat.messages.ToolCallContents()

Tool call contents with name, arguments, and optional id

### ToolCallFunction

    core.chat.messages.ToolCallFunction()

Tool call function with name and arguments

### ToolResponseContents

    core.chat.messages.ToolResponseContents()

Tool response contents with name, content, and optional id