mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
latest updates
This commit is contained in:
@@ -4,8 +4,10 @@ from __future__ import annotations
|
||||
from .filecitation import FileCitation, FileCitationTypedDict
|
||||
from .filepath import FilePath, FilePathTypedDict
|
||||
from .urlcitation import URLCitation, URLCitationTypedDict
|
||||
from openrouter.utils import get_discriminator
|
||||
from pydantic import Discriminator, Tag
|
||||
from typing import Union
|
||||
from typing_extensions import TypeAliasType
|
||||
from typing_extensions import Annotated, TypeAliasType
|
||||
|
||||
|
||||
OpenAIResponsesAnnotationTypedDict = TypeAliasType(
|
||||
@@ -14,6 +16,11 @@ OpenAIResponsesAnnotationTypedDict = TypeAliasType(
|
||||
)
|
||||
|
||||
|
||||
OpenAIResponsesAnnotation = TypeAliasType(
|
||||
"OpenAIResponsesAnnotation", Union[FilePath, FileCitation, URLCitation]
|
||||
)
|
||||
OpenAIResponsesAnnotation = Annotated[
|
||||
Union[
|
||||
Annotated[FileCitation, Tag("file_citation")],
|
||||
Annotated[URLCitation, Tag("url_citation")],
|
||||
Annotated[FilePath, Tag("file_path")],
|
||||
],
|
||||
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user