|
13 | 13 | # limitations under the License.
|
14 | 14 |
|
15 | 15 | from asyncio import to_thread
|
16 |
| -from typing import Any, Callable, Union |
| 16 | +from typing import Any, Callable, Union, Mapping, Sequence, Awaitable |
17 | 17 |
|
18 | 18 | from deprecated import deprecated
|
19 | 19 | from langchain_core.tools import BaseTool
|
@@ -47,6 +47,32 @@ def __init__(
|
47 | 47 | )
|
48 | 48 | self.__core_tool = core_tool
|
49 | 49 |
|
| 50 | + @property |
| 51 | + def _bound_params( |
| 52 | + self, |
| 53 | + ) -> Mapping[str, Union[Callable[[], Any], Callable[[], Awaitable[Any]], Any]]: |
| 54 | + return self.__core_tool._bound_params |
| 55 | + |
| 56 | + @property |
| 57 | + def _required_authn_params(self) -> Mapping[str, list[str]]: |
| 58 | + return self.__core_tool._required_authn_params |
| 59 | + |
| 60 | + @property |
| 61 | + def _required_authz_tokens(self) -> Sequence[str]: |
| 62 | + return self.__core_tool._required_authz_tokens |
| 63 | + |
| 64 | + @property |
| 65 | + def _auth_service_token_getters( |
| 66 | + self, |
| 67 | + ) -> Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]]]]: |
| 68 | + return self.__core_tool._auth_service_token_getters |
| 69 | + |
| 70 | + @property |
| 71 | + def _client_headers( |
| 72 | + self, |
| 73 | + ) -> Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]], str]]: |
| 74 | + return self.__core_tool._client_headers |
| 75 | + |
50 | 76 | def _run(self, **kwargs: Any) -> str:
|
51 | 77 | return self.__core_tool(**kwargs)
|
52 | 78 |
|
|
0 commit comments