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,7 +1,6 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from ._schema3 import Schema3, Schema3TypedDict
|
||||
from .assistantmessage import AssistantMessage, AssistantMessageTypedDict
|
||||
from .chatcompletionfinishreason import ChatCompletionFinishReason
|
||||
from .chatmessagetokenlogprobs import (
|
||||
@@ -18,7 +17,6 @@ from openrouter.types import (
|
||||
from openrouter.utils import validate_open_enum
|
||||
from pydantic import model_serializer
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
@@ -26,7 +24,6 @@ class ChatResponseChoiceTypedDict(TypedDict):
|
||||
finish_reason: Nullable[ChatCompletionFinishReason]
|
||||
index: float
|
||||
message: AssistantMessageTypedDict
|
||||
reasoning_details: NotRequired[List[Schema3TypedDict]]
|
||||
logprobs: NotRequired[Nullable[ChatMessageTokenLogprobsTypedDict]]
|
||||
|
||||
|
||||
@@ -39,13 +36,11 @@ class ChatResponseChoice(BaseModel):
|
||||
|
||||
message: AssistantMessage
|
||||
|
||||
reasoning_details: Optional[List[Schema3]] = None
|
||||
|
||||
logprobs: OptionalNullable[ChatMessageTokenLogprobs] = UNSET
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = ["reasoning_details", "logprobs"]
|
||||
optional_fields = ["logprobs"]
|
||||
nullable_fields = ["finish_reason", "logprobs"]
|
||||
null_default_fields = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user