"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .streamlogprob import StreamLogprob, StreamLogprobTypedDict
from openrouter.types import BaseModel
from typing import List, Literal
from typing_extensions import TypedDict


TextDeltaEventType = Literal["response.output_text.delta",]


class TextDeltaEventTypedDict(TypedDict):
    r"""Event emitted when a text delta is streamed"""

    content_index: int
    delta: str
    item_id: str
    logprobs: List[StreamLogprobTypedDict]
    output_index: int
    sequence_number: int
    type: TextDeltaEventType


class TextDeltaEvent(BaseModel):
    r"""Event emitted when a text delta is streamed"""

    content_index: int

    delta: str

    item_id: str

    logprobs: List[StreamLogprob]

    output_index: int

    sequence_number: int

    type: TextDeltaEventType
