mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
feat: regenerate SDK with updated OpenAPI spec
Speakeasy regeneration with latest schema changes including type renames and new server tool models.
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .openairesponsesrefusalcontent import (
|
||||
OpenAIResponsesRefusalContent,
|
||||
OpenAIResponsesRefusalContentTypedDict,
|
||||
)
|
||||
from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict
|
||||
from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import get_discriminator
|
||||
from pydantic import Discriminator, Tag
|
||||
from typing import Literal, Union
|
||||
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
||||
|
||||
|
||||
ContentPartDoneEventType = Literal["response.content_part.done",]
|
||||
|
||||
|
||||
ContentPartDoneEventPartTypedDict = TypeAliasType(
|
||||
"ContentPartDoneEventPartTypedDict",
|
||||
Union[
|
||||
ReasoningTextContentTypedDict,
|
||||
OpenAIResponsesRefusalContentTypedDict,
|
||||
ResponseOutputTextTypedDict,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
ContentPartDoneEventPart = Annotated[
|
||||
Union[
|
||||
Annotated[ResponseOutputText, Tag("output_text")],
|
||||
Annotated[ReasoningTextContent, Tag("reasoning_text")],
|
||||
Annotated[OpenAIResponsesRefusalContent, Tag("refusal")],
|
||||
],
|
||||
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
||||
]
|
||||
|
||||
|
||||
class ContentPartDoneEventTypedDict(TypedDict):
|
||||
r"""Event emitted when a content part is complete"""
|
||||
|
||||
type: ContentPartDoneEventType
|
||||
output_index: float
|
||||
item_id: str
|
||||
content_index: float
|
||||
part: ContentPartDoneEventPartTypedDict
|
||||
sequence_number: float
|
||||
|
||||
|
||||
class ContentPartDoneEvent(BaseModel):
|
||||
r"""Event emitted when a content part is complete"""
|
||||
|
||||
type: ContentPartDoneEventType
|
||||
|
||||
output_index: float
|
||||
|
||||
item_id: str
|
||||
|
||||
content_index: float
|
||||
|
||||
part: ContentPartDoneEventPart
|
||||
|
||||
sequence_number: float
|
||||
Reference in New Issue
Block a user