|
12 | 12 | import re |
13 | 13 | from collections import defaultdict |
14 | 14 | from collections.abc import Callable, Generator, Iterable, Mapping, Sequence |
15 | | -from typing import Any, Generic, Literal, ParamSpec, TypeVar, overload |
| 15 | +from typing import Any, Literal, ParamSpec, TypeVar, overload |
16 | 16 |
|
17 | 17 | from pydantic import BaseModel, ConfigDict, Field |
18 | 18 |
|
@@ -77,14 +77,14 @@ def as_json_tool(self) -> dict[str, Any]: |
77 | 77 | return self._as_json_tool.copy() |
78 | 78 |
|
79 | 79 | @classmethod |
80 | | - def from_langchain(cls, tool: Any) -> "MelleaTool[P, Any]": |
| 80 | + def from_langchain(cls, tool: Any) -> "MelleaTool[..., Any]": |
81 | 81 | """Create a MelleaTool from a LangChain tool object. |
82 | 82 |
|
83 | 83 | Args: |
84 | 84 | tool (Any): A ``langchain_core.tools.BaseTool`` instance to wrap. |
85 | 85 |
|
86 | 86 | Returns: |
87 | | - MelleaTool[P, Any]: A Mellea tool wrapping the LangChain tool. |
| 87 | + MelleaTool[..., Any]: A Mellea tool wrapping the LangChain tool. |
88 | 88 |
|
89 | 89 | Raises: |
90 | 90 | ImportError: If ``langchain-core`` is not installed. |
@@ -124,14 +124,14 @@ def parameter_remapper(*args, **kwargs): |
124 | 124 | ) from e |
125 | 125 |
|
126 | 126 | @classmethod |
127 | | - def from_smolagents(cls, tool: Any) -> "MelleaTool[P, Any]": |
| 127 | + def from_smolagents(cls, tool: Any) -> "MelleaTool[..., Any]": |
128 | 128 | """Create a Tool from a HuggingFace smolagents tool object. |
129 | 129 |
|
130 | 130 | Args: |
131 | 131 | tool: A smolagents.Tool instance |
132 | 132 |
|
133 | 133 | Returns: |
134 | | - MelleaTool[P, Any]: A Mellea tool wrapping the smolagents tool |
| 134 | + MelleaTool[..., Any]: A Mellea tool wrapping the smolagents tool |
135 | 135 |
|
136 | 136 | Raises: |
137 | 137 | ImportError: If smolagents is not installed |
|
0 commit comments