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

from __future__ import annotations
from friendli.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class TopLogprobsTypedDict(TypedDict):
    token: NotRequired[str]
    r"""The token."""
    logprob: NotRequired[float]
    r"""The log probability of this token."""


class TopLogprobs(BaseModel):
    token: Optional[str] = None
    r"""The token."""

    logprob: Optional[float] = None
    r"""The log probability of this token."""


class ContentTypedDict(TypedDict):
    token: NotRequired[str]
    r"""The token."""
    logprob: NotRequired[float]
    r"""The log probability of this token."""
    top_logprobs: NotRequired[List[TopLogprobsTypedDict]]
    r"""List of the most likely tokens and their log probability, at this token position."""


class Content(BaseModel):
    token: Optional[str] = None
    r"""The token."""

    logprob: Optional[float] = None
    r"""The log probability of this token."""

    top_logprobs: Optional[List[TopLogprobs]] = None
    r"""List of the most likely tokens and their log probability, at this token position."""


class LogprobsTypedDict(TypedDict):
    r"""Log probability information for the choice."""

    content: NotRequired[List[ContentTypedDict]]
    r"""A list of message content tokens with log probability information."""


class Logprobs(BaseModel):
    r"""Log probability information for the choice."""

    content: Optional[List[Content]] = None
    r"""A list of message content tokens with log probability information."""
