Skip to content

Commit c450fac

Browse files
committed
Fix typing
1 parent af4de4d commit c450fac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mistralai/extra/run/tools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@
3535
class RunFunction:
3636
name: str
3737
callable: Callable
38-
tool: FunctionTool
38+
tool: Union[FunctionToolTypedDict, ToolTypedDict]
3939

4040

4141
@dataclass
4242
class RunCoroutine:
4343
name: str
4444
awaitable: Callable
45-
tool: FunctionTool
45+
tool: Union[FunctionToolTypedDict, ToolTypedDict]
4646

4747

4848
@dataclass
4949
class RunMCPTool:
5050
name: str
51-
tool: FunctionTool
51+
tool: FunctionToolTypedDict
5252
mcp_client: MCPClientProtocol
5353

5454

@@ -141,7 +141,7 @@ def _get_function_parameters(
141141
return schema
142142

143143

144-
def create_tool_call(func: Callable) -> FunctionToolTypedDict | ToolTypedDict:
144+
def create_tool_call(func: Callable) -> Union[FunctionToolTypedDict, ToolTypedDict]:
145145
"""Parse a function docstring / type annotations to create a FunctionToolTypedDict or a ToolTypedDict."""
146146
name = func.__name__
147147

0 commit comments

Comments
 (0)