Mistral AI · Schema

Message

Properties

Name Type Description
role string
content object
tool_calls array
tool_call_id string
View JSON Schema on GitHub

JSON Schema

mistral-message-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Message",
  "title": "Message",
  "type": "object",
  "required": [
    "role",
    "content"
  ],
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "system",
        "user",
        "assistant",
        "tool"
      ]
    },
    "content": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      ]
    },
    "tool_calls": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ToolCall"
      }
    },
    "tool_call_id": {
      "type": "string"
    }
  }
}