{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vhishongkong-com/json-schema/vhishongkong-com-chat-in-schema.json",
  "title": "ChatIn",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vhishongkong-com-openapi.json#/components/schemas/ChatIn",
  "properties": {
    "messages": {
      "items": {
        "$ref": "#/$defs/Msg"
      },
      "type": "array",
      "maxItems": 40,
      "minItems": 1,
      "title": "Messages"
    },
    "profile": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Profile"
    },
    "locale": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Locale",
      "default": "en"
    }
  },
  "type": "object",
  "required": [
    "messages"
  ],
  "$defs": {
    "Msg": {
      "properties": {
        "role": {
          "type": "string",
          "pattern": "^(user|assistant)$",
          "title": "Role"
        },
        "content": {
          "type": "string",
          "maxLength": 4000,
          "title": "Content"
        }
      },
      "type": "object",
      "required": [
        "role",
        "content"
      ],
      "title": "Msg"
    }
  }
}