mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
Speakeasy regeneration with latest schema changes including type renames and new server tool models.
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from .formatjsonobjectconfig import (
|
|
FormatJSONObjectConfig,
|
|
FormatJSONObjectConfigTypedDict,
|
|
)
|
|
from .formatjsonschemaconfig import (
|
|
FormatJSONSchemaConfig,
|
|
FormatJSONSchemaConfigTypedDict,
|
|
)
|
|
from .formattextconfig import FormatTextConfig, FormatTextConfigTypedDict
|
|
from openrouter.utils import get_discriminator
|
|
from pydantic import Discriminator, Tag
|
|
from typing import Union
|
|
from typing_extensions import Annotated, TypeAliasType
|
|
|
|
|
|
FormatsTypedDict = TypeAliasType(
|
|
"FormatsTypedDict",
|
|
Union[
|
|
FormatTextConfigTypedDict,
|
|
FormatJSONObjectConfigTypedDict,
|
|
FormatJSONSchemaConfigTypedDict,
|
|
],
|
|
)
|
|
r"""Text response format configuration"""
|
|
|
|
|
|
Formats = Annotated[
|
|
Union[
|
|
Annotated[FormatTextConfig, Tag("text")],
|
|
Annotated[FormatJSONObjectConfig, Tag("json_object")],
|
|
Annotated[FormatJSONSchemaConfig, Tag("json_schema")],
|
|
],
|
|
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
|
]
|
|
r"""Text response format configuration"""
|