{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookmyhost/json-schema/bookmyhost-chat-completion-function-message-schema.json",
  "title": "ChatCompletionFunctionMessage",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookmyhost-chat-completions-api-openapi.yml#/components/schemas/ChatCompletionFunctionMessage",
  "properties": {
    "role": {
      "const": "function",
      "title": "Role",
      "type": "string"
    },
    "content": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "$ref": "#/$defs/ChatCompletionTextObject"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "tool_call_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tool Call Id"
    }
  },
  "required": [
    "role",
    "content",
    "name",
    "tool_call_id"
  ],
  "type": "object",
  "$defs": {
    "ChatCompletionCachedContent": {
      "properties": {
        "type": {
          "const": "ephemeral",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "ChatCompletionCachedContent",
      "type": "object"
    },
    "ChatCompletionTextObject": {
      "properties": {
        "type": {
          "const": "text",
          "title": "Type",
          "type": "string"
        },
        "text": {
          "title": "Text",
          "type": "string"
        },
        "cache_control": {
          "$ref": "#/$defs/ChatCompletionCachedContent"
        }
      },
      "required": [
        "type",
        "text"
      ],
      "title": "ChatCompletionTextObject",
      "type": "object"
    }
  }
}