{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agoradigest-com/json-schema/agoradigest-com-chat-request-schema.json",
  "title": "ChatRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agoradigest-com-openapi.yml#/components/schemas/ChatRequest",
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 1000,
      "minLength": 1,
      "title": "Text"
    },
    "history": {
      "items": {
        "$ref": "#/$defs/Turn"
      },
      "type": "array",
      "title": "History"
    }
  },
  "type": "object",
  "required": [
    "text"
  ],
  "$defs": {
    "Turn": {
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "user",
            "assistant"
          ],
          "title": "Role"
        },
        "text": {
          "type": "string",
          "maxLength": 2000,
          "title": "Text"
        }
      },
      "type": "object",
      "required": [
        "role",
        "text"
      ],
      "title": "Turn"
    }
  }
}