{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/docsbot-ai/json-schema/docsbot-ai-ask-schema.json",
  "title": "Ask",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docsbot-ai-openapi.json#/components/schemas/Ask",
  "properties": {
    "question": {
      "type": "string",
      "minLength": 1,
      "title": "The question to ask the bot"
    },
    "history": {
      "items": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "type": "array",
      "title": "Chat history, comprised of Q/A pairs"
    },
    "format": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "markdown",
            "text",
            "html"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Whether to return the answer as markdown, html or raw text",
      "default": "markdown"
    },
    "full_source": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Whether to return the full source text chunk or not",
      "default": false
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "An object with arbitrary metadata about the the user or chat call. Keys `referrer`, `email`, and `name` are shown in question history logs."
    },
    "testing": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Whether to ignore the question or not in logs",
      "default": false
    },
    "autocut": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "integer"
        }
      ],
      "title": "Autocut results to num groups",
      "default": false
    },
    "context_items": {
      "type": "integer",
      "maximum": 32.0,
      "exclusiveMinimum": 0.0,
      "title": "How many context sources to use",
      "default": 5
    }
  },
  "type": "object",
  "required": [
    "question"
  ]
}