{
  "$defs": {
    "Usage": {
      "description": "Token accounting for a single request, normalised across providers.",
      "properties": {
        "prompt_tokens": {
          "default": 0,
          "title": "Prompt Tokens",
          "type": "integer"
        },
        "completion_tokens": {
          "default": 0,
          "title": "Completion Tokens",
          "type": "integer"
        },
        "total_tokens": {
          "default": 0,
          "title": "Total Tokens",
          "type": "integer"
        }
      },
      "title": "Usage",
      "type": "object"
    }
  },
  "description": "A single streamed delta from a chat completion.\n\nAttributes:\n    delta: The incremental text for this chunk (may be empty).\n    done: Whether this is the terminal chunk.\n    finish_reason: Stop reason, populated on the terminal chunk if known.\n    usage: Final token accounting, populated on the terminal chunk if known.",
  "properties": {
    "delta": {
      "default": "",
      "title": "Delta",
      "type": "string"
    },
    "done": {
      "default": false,
      "title": "Done",
      "type": "boolean"
    },
    "finish_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Finish Reason"
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/Usage"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "title": "ChatChunk",
  "type": "object"
}
