Skip to content

Commit d33d044

Browse files
committed
fix(toolbox-llamaindex): Expose internal tool state for better debuggability
1 parent dc5c25e commit d33d044

File tree

1 file changed

+27
-1
lines changed
  • packages/toolbox-llamaindex/src/toolbox_llamaindex

1 file changed

+27
-1
lines changed

packages/toolbox-llamaindex/src/toolbox_llamaindex/tools.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
from asyncio import to_thread
16-
from typing import Any, Callable, Union
16+
from typing import Any, Callable, Union, Mapping, Sequence, Awaitable
1717

1818
from deprecated import deprecated
1919
from llama_index.core.tools import ToolMetadata
@@ -57,6 +57,32 @@ def metadata(self) -> ToolMetadata:
5757
),
5858
)
5959

60+
@property
61+
def _bound_params(
62+
self,
63+
) -> Mapping[str, Union[Callable[[], Any], Callable[[], Awaitable[Any]], Any]]:
64+
return self.__core_tool._bound_params
65+
66+
@property
67+
def _required_authn_params(self) -> Mapping[str, list[str]]:
68+
return self.__core_tool._required_authn_params
69+
70+
@property
71+
def _required_authz_tokens(self) -> Sequence[str]:
72+
return self.__core_tool._required_authz_tokens
73+
74+
@property
75+
def _auth_service_token_getters(
76+
self,
77+
) -> Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]]]]:
78+
return self.__core_tool._auth_service_token_getters
79+
80+
@property
81+
def _client_headers(
82+
self,
83+
) -> Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]], str]]:
84+
return self.__core_tool._client_headers
85+
6086
def call(self, **kwargs: Any) -> ToolOutput: # type: ignore
6187
output_content = self.__core_tool(**kwargs)
6288
return ToolOutput(

0 commit comments

Comments
 (0)