{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/advisorppc-com/json-schema/advisorppc-com-chat-in-schema.json",
  "title": "ChatIn",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/advisorppc-com-openapi.json#/components/schemas/ChatIn",
  "properties": {
    "resumable": {
      "type": "boolean",
      "title": "Resumable",
      "default": false
    },
    "question_cards": {
      "type": "boolean",
      "title": "Question Cards",
      "default": false
    },
    "continuation": {
      "anyOf": [
        {
          "$ref": "#/$defs/app__chat_continuation__AnswerIn"
        },
        {
          "type": "null"
        }
      ]
    },
    "messages": {
      "items": {
        "$ref": "#/$defs/ChatMessageIn"
      },
      "type": "array",
      "maxItems": 50,
      "minItems": 1,
      "title": "Messages"
    },
    "attachments": {
      "items": {
        "$ref": "#/$defs/ChatAttachmentRefIn"
      },
      "type": "array",
      "maxItems": 5,
      "title": "Attachments"
    },
    "conversationId": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Conversationid"
    },
    "clientRequestId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Clientrequestid"
    },
    "model": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Model"
    },
    "effort": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "low",
            "medium",
            "high",
            "xhigh",
            "max"
          ],
          "maxLength": 16
        },
        {
          "type": "null"
        }
      ],
      "title": "Effort"
    },
    "writeMode": {
      "type": "string",
      "enum": [
        "manual",
        "accept",
        "plan",
        "auto"
      ],
      "title": "Writemode",
      "default": "manual"
    },
    "agentInstanceId": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Agentinstanceid"
    },
    "connector": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{0,39}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Connector"
    },
    "timeZone": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64,
          "pattern": "^[A-Za-z0-9_+\\-/]{1,64}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Timezone"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "messages"
  ],
  "$defs": {
    "ChatAttachmentRefIn": {
      "properties": {
        "assetId": {
          "type": "string",
          "maxLength": 32,
          "minLength": 32,
          "pattern": "^[0-9a-f]{32}$",
          "title": "Assetid"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "assetId"
      ],
      "title": "ChatAttachmentRefIn",
      "description": "Opaque reference only. File metadata is always loaded server-side."
    },
    "ChatMessageIn": {
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "user",
            "assistant"
          ],
          "title": "Role"
        },
        "content": {
          "type": "string",
          "maxLength": 20000,
          "minLength": 1,
          "title": "Content"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "role",
        "content"
      ],
      "title": "ChatMessageIn"
    },
    "app__chat_continuation__AnswerIn": {
      "properties": {
        "question_id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "title": "Question Id"
        },
        "version": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Version"
        },
        "continuation_token": {
          "type": "string",
          "maxLength": 128,
          "minLength": 32,
          "pattern": "^[A-Za-z0-9_-]+$",
          "title": "Continuation Token"
        },
        "option_id": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 40
            },
            {
              "type": "null"
            }
          ],
          "title": "Option Id"
        },
        "free_text": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 1000
            },
            {
              "type": "null"
            }
          ],
          "title": "Free Text"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "question_id",
        "version",
        "continuation_token"
      ],
      "title": "AnswerIn"
    }
  }
}