Files
openrouter-python-sdk-retry…/src/openrouter/components/anthropiccitationsearchresultlocationparam.py
T
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
7010ca5c2e chore: 🐝 Update SDK - Generate (spec change merged) 0.11.24 (#436)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-13 17:59:18 +00:00

51 lines
1.2 KiB
Python

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
from pydantic import model_serializer
from typing import Literal
from typing_extensions import TypedDict
AnthropicCitationSearchResultLocationParamType = Literal["search_result_location",]
class AnthropicCitationSearchResultLocationParamTypedDict(TypedDict):
cited_text: str
end_block_index: int
search_result_index: int
source: str
start_block_index: int
title: Nullable[str]
type: AnthropicCitationSearchResultLocationParamType
class AnthropicCitationSearchResultLocationParam(BaseModel):
cited_text: str
end_block_index: int
search_result_index: int
source: str
start_block_index: int
title: Nullable[str]
type: AnthropicCitationSearchResultLocationParamType
@model_serializer(mode="wrap")
def serialize_model(self, handler):
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
m[k] = val
return m