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

from __future__ import annotations
from friendli.types import BaseModel
import pydantic
from typing import Literal
from typing_extensions import Annotated, TypedDict


Type = Literal["json_schema"]
r"""The type of the response format: `json_schema`"""


class SchemaTypedDict(TypedDict):
    r"""The schema for the response format, described as a JSON Schema object."""


class Schema(BaseModel):
    r"""The schema for the response format, described as a JSON Schema object."""


class JSONSchemaTypedDict(TypedDict):
    schema_: SchemaTypedDict
    r"""The schema for the response format, described as a JSON Schema object."""


class JSONSchema(BaseModel):
    schema_: Annotated[Schema, pydantic.Field(alias="schema")]
    r"""The schema for the response format, described as a JSON Schema object."""


class ResponseFormatJSONSchemaTypedDict(TypedDict):
    type: Type
    r"""The type of the response format: `json_schema`"""
    json_schema: JSONSchemaTypedDict


class ResponseFormatJSONSchema(BaseModel):
    type: Type
    r"""The type of the response format: `json_schema`"""

    json_schema: JSONSchema
