mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +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,38 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .chatassistantmessage import ChatAssistantMessage, ChatAssistantMessageTypedDict
|
||||
from .chatdevelopermessage import ChatDeveloperMessage, ChatDeveloperMessageTypedDict
|
||||
from .chatsystemmessage import ChatSystemMessage, ChatSystemMessageTypedDict
|
||||
from .chattoolmessage import ChatToolMessage, ChatToolMessageTypedDict
|
||||
from .chatusermessage import ChatUserMessage, ChatUserMessageTypedDict
|
||||
from openrouter.utils import get_discriminator
|
||||
from pydantic import Discriminator, Tag
|
||||
from typing import Union
|
||||
from typing_extensions import Annotated, TypeAliasType
|
||||
|
||||
|
||||
ChatMessagesTypedDict = TypeAliasType(
|
||||
"ChatMessagesTypedDict",
|
||||
Union[
|
||||
ChatSystemMessageTypedDict,
|
||||
ChatUserMessageTypedDict,
|
||||
ChatDeveloperMessageTypedDict,
|
||||
ChatToolMessageTypedDict,
|
||||
ChatAssistantMessageTypedDict,
|
||||
],
|
||||
)
|
||||
r"""Chat completion message with role-based discrimination"""
|
||||
|
||||
|
||||
ChatMessages = Annotated[
|
||||
Union[
|
||||
Annotated[ChatSystemMessage, Tag("system")],
|
||||
Annotated[ChatUserMessage, Tag("user")],
|
||||
Annotated[ChatDeveloperMessage, Tag("developer")],
|
||||
Annotated[ChatAssistantMessage, Tag("assistant")],
|
||||
Annotated[ChatToolMessage, Tag("tool")],
|
||||
],
|
||||
Discriminator(lambda m: get_discriminator(m, "role", "role")),
|
||||
]
|
||||
r"""Chat completion message with role-based discrimination"""
|
||||
Reference in New Issue
Block a user