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

from __future__ import annotations
from .openairesponsesannotation import (
    OpenAIResponsesAnnotation,
    OpenAIResponsesAnnotationTypedDict,
)
from openrouter.types import BaseModel
import pydantic
from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ResponseOutputTextTopLogprobTypedDict(TypedDict):
    bytes_: List[int]
    logprob: float
    token: str


class ResponseOutputTextTopLogprob(BaseModel):
    bytes_: Annotated[List[int], pydantic.Field(alias="bytes")]

    logprob: float

    token: str


class LogprobTypedDict(TypedDict):
    bytes_: List[int]
    logprob: float
    token: str
    top_logprobs: List[ResponseOutputTextTopLogprobTypedDict]


class Logprob(BaseModel):
    bytes_: Annotated[List[int], pydantic.Field(alias="bytes")]

    logprob: float

    token: str

    top_logprobs: List[ResponseOutputTextTopLogprob]


ResponseOutputTextType = Literal["output_text",]


class ResponseOutputTextTypedDict(TypedDict):
    text: str
    type: ResponseOutputTextType
    annotations: NotRequired[List[OpenAIResponsesAnnotationTypedDict]]
    logprobs: NotRequired[List[LogprobTypedDict]]


class ResponseOutputText(BaseModel):
    text: str

    type: ResponseOutputTextType

    annotations: Optional[List[OpenAIResponsesAnnotation]] = None

    logprobs: Optional[List[Logprob]] = None
