mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
Co-authored-by: speakeasybot <bot@speakeasyapi.dev> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
51 lines
1.8 KiB
Python
51 lines
1.8 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from .anthropiccachecontroldirective import (
|
|
AnthropicCacheControlDirective,
|
|
AnthropicCacheControlDirectiveTypedDict,
|
|
)
|
|
from .anthropictextblockparam import (
|
|
AnthropicTextBlockParam,
|
|
AnthropicTextBlockParamTypedDict,
|
|
)
|
|
from openrouter.types import BaseModel
|
|
from typing import List, Literal, Optional
|
|
from typing_extensions import NotRequired, TypedDict
|
|
|
|
|
|
class AnthropicSearchResultBlockParamCitationsTypedDict(TypedDict):
|
|
enabled: NotRequired[bool]
|
|
|
|
|
|
class AnthropicSearchResultBlockParamCitations(BaseModel):
|
|
enabled: Optional[bool] = None
|
|
|
|
|
|
AnthropicSearchResultBlockParamType = Literal["search_result",]
|
|
|
|
|
|
class AnthropicSearchResultBlockParamTypedDict(TypedDict):
|
|
content: List[AnthropicTextBlockParamTypedDict]
|
|
source: str
|
|
title: str
|
|
type: AnthropicSearchResultBlockParamType
|
|
cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
|
|
r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
|
|
citations: NotRequired[AnthropicSearchResultBlockParamCitationsTypedDict]
|
|
|
|
|
|
class AnthropicSearchResultBlockParam(BaseModel):
|
|
content: List[AnthropicTextBlockParam]
|
|
|
|
source: str
|
|
|
|
title: str
|
|
|
|
type: AnthropicSearchResultBlockParamType
|
|
|
|
cache_control: Optional[AnthropicCacheControlDirective] = None
|
|
r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
|
|
|
|
citations: Optional[AnthropicSearchResultBlockParamCitations] = None
|