mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
40 lines
941 B
Python
40 lines
941 B
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from openrouter.types import BaseModel, Nullable
|
|
from typing import Any, Dict, List, Literal, Union
|
|
from typing_extensions import TypeAliasType, TypedDict
|
|
|
|
|
|
ModeRequired = Literal["required",]
|
|
|
|
|
|
ModeAuto = Literal["auto",]
|
|
|
|
|
|
ModeTypedDict = TypeAliasType("ModeTypedDict", Union[ModeAuto, ModeRequired])
|
|
|
|
|
|
Mode = TypeAliasType("Mode", Union[ModeAuto, ModeRequired])
|
|
|
|
|
|
ToolChoiceAllowedType = Literal["allowed_tools",]
|
|
|
|
|
|
class ToolChoiceAllowedTypedDict(TypedDict):
|
|
r"""Constrains the model to a pre-defined set of allowed tools"""
|
|
|
|
mode: ModeTypedDict
|
|
tools: List[Dict[str, Nullable[Any]]]
|
|
type: ToolChoiceAllowedType
|
|
|
|
|
|
class ToolChoiceAllowed(BaseModel):
|
|
r"""Constrains the model to a pre-defined set of allowed tools"""
|
|
|
|
mode: Mode
|
|
|
|
tools: List[Dict[str, Nullable[Any]]]
|
|
|
|
type: ToolChoiceAllowedType
|