mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +00:00
stop making copies of inputs (#15926)
This commit is contained in:
parent
9fb09c1c30
commit
1afac77439
@ -248,7 +248,11 @@ class ChildTool(BaseTool):
|
||||
else:
|
||||
if input_args is not None:
|
||||
result = input_args.parse_obj(tool_input)
|
||||
return {k: v for k, v in result.dict().items() if k in tool_input}
|
||||
return {
|
||||
k: getattr(result, k)
|
||||
for k, v in result.dict().items()
|
||||
if k in tool_input
|
||||
}
|
||||
return tool_input
|
||||
|
||||
@root_validator()
|
||||
|
Loading…
Reference in New Issue
Block a user