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

from __future__ import annotations
from .streamlogprobtoplogprob import (
    StreamLogprobTopLogprob,
    StreamLogprobTopLogprobTypedDict,
)
from openrouter.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class StreamLogprobTypedDict(TypedDict):
    r"""Log probability information for a token"""

    logprob: float
    token: str
    bytes_: NotRequired[List[int]]
    top_logprobs: NotRequired[List[StreamLogprobTopLogprobTypedDict]]


class StreamLogprob(BaseModel):
    r"""Log probability information for a token"""

    logprob: float

    token: str

    bytes_: Annotated[Optional[List[int]], pydantic.Field(alias="bytes")] = None

    top_logprobs: Optional[List[StreamLogprobTopLogprob]] = None
