mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-08 11:22:59 +08:00
85 lines
1.7 KiB
Python
85 lines
1.7 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from openrouter.types import BaseModel
|
|
from typing import List, Literal, Optional, Union
|
|
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
|
|
|
|
TypeFile = Literal["file"]
|
|
|
|
ContentTypeImageURL = Literal["image_url"]
|
|
|
|
|
|
class FileAnnotationDetailImageURLTypedDict(TypedDict):
|
|
url: str
|
|
|
|
|
|
class FileAnnotationDetailImageURL(BaseModel):
|
|
url: str
|
|
|
|
|
|
class ContentImageURLTypedDict(TypedDict):
|
|
type: ContentTypeImageURL
|
|
image_url: FileAnnotationDetailImageURLTypedDict
|
|
|
|
|
|
class ContentImageURL(BaseModel):
|
|
type: ContentTypeImageURL
|
|
|
|
image_url: FileAnnotationDetailImageURL
|
|
|
|
|
|
ContentTypeText = Literal["text"]
|
|
|
|
|
|
class ContentTextTypedDict(TypedDict):
|
|
type: ContentTypeText
|
|
text: str
|
|
|
|
|
|
class ContentText(BaseModel):
|
|
type: ContentTypeText
|
|
|
|
text: str
|
|
|
|
|
|
FileAnnotationDetailContentUnionTypedDict = TypeAliasType(
|
|
"FileAnnotationDetailContentUnionTypedDict",
|
|
Union[ContentTextTypedDict, ContentImageURLTypedDict],
|
|
)
|
|
|
|
|
|
FileAnnotationDetailContentUnion = TypeAliasType(
|
|
"FileAnnotationDetailContentUnion", Union[ContentText, ContentImageURL]
|
|
)
|
|
|
|
|
|
class FileTypedDict(TypedDict):
|
|
hash: str
|
|
content: List[FileAnnotationDetailContentUnionTypedDict]
|
|
name: NotRequired[str]
|
|
|
|
|
|
class File(BaseModel):
|
|
hash: str
|
|
|
|
content: List[FileAnnotationDetailContentUnion]
|
|
|
|
name: Optional[str] = None
|
|
|
|
|
|
class FileAnnotationDetailTypedDict(TypedDict):
|
|
r"""File annotation with content"""
|
|
|
|
type: TypeFile
|
|
file: FileTypedDict
|
|
|
|
|
|
class FileAnnotationDetail(BaseModel):
|
|
r"""File annotation with content"""
|
|
|
|
type: TypeFile
|
|
|
|
file: File
|