Skip to content

Commit

Permalink
fix(types): correct type for InputSchema (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed May 14, 2024
1 parent 9e75933 commit 7ea6e4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/anthropic/types/beta/tools/tool_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

from __future__ import annotations

from typing import Optional
from typing import Dict, Union, Optional
from typing_extensions import Literal, Required, TypedDict

__all__ = ["ToolParam", "InputSchema"]


class InputSchema(TypedDict, total=False):
class InputSchemaTyped(TypedDict, total=False):
type: Required[Literal["object"]]

properties: Optional[object]


InputSchema = Union[InputSchemaTyped, Dict[str, object]]


class ToolParam(TypedDict, total=False):
input_schema: Required[InputSchema]
"""[JSON schema](https://json-schema.org/) for this tool's input.
Expand Down

0 comments on commit 7ea6e4f

Please sign in to comment.