File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
packages/toolbox-langchain/src/toolbox_langchain Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,13 @@ def __init__(
38
38
Args:
39
39
core_tool: The underlying core async ToolboxTool instance.
40
40
"""
41
+
42
+ # Due to how pydantic works, we must initialize the underlying
43
+ # BaseTool class before assigning values to member variables.
41
44
super ().__init__ (
42
- name = self . __core_tool .__name__ ,
43
- description = self . __core_tool .__doc__ ,
44
- args_schema = self . __core_tool ._ToolboxTool__pydantic_model ,
45
+ name = core_tool .__name__ ,
46
+ description = core_tool .__doc__ ,
47
+ args_schema = core_tool ._ToolboxTool__pydantic_model ,
45
48
)
46
49
self .__core_tool = core_tool
47
50
Original file line number Diff line number Diff line change @@ -36,10 +36,13 @@ def __init__(
36
36
Args:
37
37
core_sync_tool: The underlying core sync ToolboxTool instance.
38
38
"""
39
+
40
+ # Due to how pydantic works, we must initialize the underlying
41
+ # BaseTool class before assigning values to member variables.
39
42
super ().__init__ (
40
- name = self . __core_sync_tool .__name__ ,
41
- description = self . __core_sync_tool .__doc__ ,
42
- args_schema = self . __core_sync_tool ._ToolboxSyncTool__async_tool ._ToolboxTool__pydantic_model ,
43
+ name = core_sync_tool .__name__ ,
44
+ description = core_sync_tool .__doc__ ,
45
+ args_schema = core_sync_tool ._ToolboxSyncTool__async_tool ._ToolboxTool__pydantic_model ,
43
46
)
44
47
self .__core_sync_tool = core_sync_tool
45
48
You can’t perform that action at this time.
0 commit comments