{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowra-dev/json-schema/flowra-dev-chat-dto-schema.json",
  "title": "ChatDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowra-dev-llm-api-openapi.yml#/components/schemas/ChatDto",
  "type": "object",
  "properties": {
    "messages": {
      "description": "Conversation history",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ChatMessageDto"
      }
    },
    "model": {
      "type": "string",
      "description": "Model ID"
    },
    "temperature": {
      "type": "number",
      "description": "Temperature (0-2)"
    },
    "maxTokens": {
      "type": "number",
      "description": "Max tokens in response"
    },
    "systemPrompt": {
      "type": "string",
      "description": "System prompt (prepended if no system message in history)"
    }
  },
  "required": [
    "messages"
  ],
  "$defs": {
    "ChatMessageDto": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "user",
            "assistant",
            "system"
          ],
          "description": "Message role"
        },
        "content": {
          "type": "string",
          "maxLength": 400000,
          "description": "Message content"
        }
      },
      "required": [
        "role",
        "content"
      ]
    }
  }
}