mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
Project import generated by Copybara.
GitOrigin-RevId: 2592bdc8b4b7c695a3d689390aedc9a42914acc8
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from ._schema2 import Schema2, Schema2TypedDict
|
||||
from .chatmessagecontentitem import (
|
||||
ChatMessageContentItem,
|
||||
ChatMessageContentItemTypedDict,
|
||||
@@ -32,6 +33,22 @@ AssistantMessageContent = TypeAliasType(
|
||||
)
|
||||
|
||||
|
||||
class AssistantMessageImageURLTypedDict(TypedDict):
|
||||
url: str
|
||||
|
||||
|
||||
class AssistantMessageImageURL(BaseModel):
|
||||
url: str
|
||||
|
||||
|
||||
class ImageTypedDict(TypedDict):
|
||||
image_url: AssistantMessageImageURLTypedDict
|
||||
|
||||
|
||||
class Image(BaseModel):
|
||||
image_url: AssistantMessageImageURL
|
||||
|
||||
|
||||
class AssistantMessageTypedDict(TypedDict):
|
||||
role: Literal["assistant"]
|
||||
content: NotRequired[Nullable[AssistantMessageContentTypedDict]]
|
||||
@@ -39,6 +56,8 @@ class AssistantMessageTypedDict(TypedDict):
|
||||
tool_calls: NotRequired[List[ChatMessageToolCallTypedDict]]
|
||||
refusal: NotRequired[Nullable[str]]
|
||||
reasoning: NotRequired[Nullable[str]]
|
||||
reasoning_details: NotRequired[List[Schema2TypedDict]]
|
||||
images: NotRequired[List[ImageTypedDict]]
|
||||
|
||||
|
||||
class AssistantMessage(BaseModel):
|
||||
@@ -57,9 +76,21 @@ class AssistantMessage(BaseModel):
|
||||
|
||||
reasoning: OptionalNullable[str] = UNSET
|
||||
|
||||
reasoning_details: Optional[List[Schema2]] = None
|
||||
|
||||
images: Optional[List[Image]] = None
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = ["content", "name", "tool_calls", "refusal", "reasoning"]
|
||||
optional_fields = [
|
||||
"content",
|
||||
"name",
|
||||
"tool_calls",
|
||||
"refusal",
|
||||
"reasoning",
|
||||
"reasoning_details",
|
||||
"images",
|
||||
]
|
||||
nullable_fields = ["content", "refusal", "reasoning"]
|
||||
null_default_fields = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user