mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
fixes
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .chatmessagecontentitem import (
|
||||
ChatMessageContentItem,
|
||||
ChatMessageContentItemTypedDict,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import validate_const
|
||||
import pydantic
|
||||
from pydantic.functional_validators import AfterValidator
|
||||
from typing import List, Literal, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
||||
|
||||
|
||||
UserMessageContentTypedDict = TypeAliasType(
|
||||
"UserMessageContentTypedDict", Union[str, List[ChatMessageContentItemTypedDict]]
|
||||
)
|
||||
|
||||
|
||||
UserMessageContent = TypeAliasType(
|
||||
"UserMessageContent", Union[str, List[ChatMessageContentItem]]
|
||||
)
|
||||
|
||||
|
||||
class UserMessageTypedDict(TypedDict):
|
||||
content: UserMessageContentTypedDict
|
||||
role: Literal["user"]
|
||||
name: NotRequired[str]
|
||||
|
||||
|
||||
class UserMessage(BaseModel):
|
||||
content: UserMessageContent
|
||||
|
||||
ROLE: Annotated[
|
||||
Annotated[Literal["user"], AfterValidator(validate_const("user"))],
|
||||
pydantic.Field(alias="role"),
|
||||
] = "user"
|
||||
|
||||
name: Optional[str] = None
|
||||
Reference in New Issue
Block a user