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

from __future__ import annotations
from r9s.types import BaseModel
from typing import List, Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict


EmbeddingRequestInputTypedDict = TypeAliasType(
    "EmbeddingRequestInputTypedDict", Union[str, List[str]]
)
r"""Input text"""


EmbeddingRequestInput = TypeAliasType("EmbeddingRequestInput", Union[str, List[str]])
r"""Input text"""


EncodingFormat = Literal[
    "float",
    "base64",
]


class EmbeddingRequestTypedDict(TypedDict):
    model: str
    r"""Model name"""
    input: EmbeddingRequestInputTypedDict
    r"""Input text"""
    encoding_format: NotRequired[EncodingFormat]
    dimensions: NotRequired[int]
    r"""Output dimensions"""
    user: NotRequired[str]


class EmbeddingRequest(BaseModel):
    model: str
    r"""Model name"""

    input: EmbeddingRequestInput
    r"""Input text"""

    encoding_format: Optional[EncodingFormat] = "float"

    dimensions: Optional[int] = None
    r"""Output dimensions"""

    user: Optional[str] = None
