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

from __future__ import annotations
from .jsonschema import JSONSchema, JSONSchemaTypedDict
from r9s.types import BaseModel
from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict


ResponseFormatType = Literal[
    "text",
    "json_object",
    "json_schema",
]


class ResponseFormatTypedDict(TypedDict):
    type: NotRequired[ResponseFormatType]
    json_schema: NotRequired[JSONSchemaTypedDict]


class ResponseFormat(BaseModel):
    type: Optional[ResponseFormatType] = None

    json_schema: Optional[JSONSchema] = None
