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

from __future__ import annotations
from openrouter.types import BaseModel
from typing import Literal
from typing_extensions import TypedDict


ResponseFormatTextGrammarType = Literal["grammar",]


class ResponseFormatTextGrammarTypedDict(TypedDict):
    r"""Custom grammar response format"""

    type: ResponseFormatTextGrammarType
    grammar: str
    r"""Custom grammar for text generation"""


class ResponseFormatTextGrammar(BaseModel):
    r"""Custom grammar response format"""

    type: ResponseFormatTextGrammarType

    grammar: str
    r"""Custom grammar for text generation"""
