Mistral AI · Schema

ChatMessage

AgentsArtificial IntelligenceBatch ProcessingChatEmbeddingsFine-TuningLarge Language ModelsOCR

Properties

Name Type Description
role string The role of the message author.
content object The content of the message.
tool_calls array Tool calls generated by the agent.
tool_call_id string The ID of the tool call this message is responding to.
View JSON Schema on GitHub

JSON Schema

mistral-ai-chatmessage-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ChatMessage",
  "title": "ChatMessage",
  "type": "object",
  "required": [
    "role",
    "content"
  ],
  "properties": {
    "role": {
      "type": "string",
      "description": "The role of the message author.",
      "enum": [
        "system",
        "user",
        "assistant",
        "tool"
      ]
    },
    "content": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      ],
      "description": "The content of the message."
    },
    "tool_calls": {
      "type": "array",
      "description": "Tool calls generated by the agent.",
      "items": {
        "$ref": "#/components/schemas/ToolCall"
      }
    },
    "tool_call_id": {
      "type": "string",
      "description": "The ID of the tool call this message is responding to."
    }
  }
}