mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-21 14:18:52 +00:00
_prep_run_args,tool_input copy, Exception
This commit is contained in:
parent
3382b0d8ea
commit
dd9031fc82
@ -945,7 +945,14 @@ def _prep_run_args(
|
|||||||
tool_input: Union[str, dict] = cast(ToolCall, input)["args"].copy()
|
tool_input: Union[str, dict] = cast(ToolCall, input)["args"].copy()
|
||||||
else:
|
else:
|
||||||
tool_call_id = None
|
tool_call_id = None
|
||||||
tool_input = cast(Union[str, dict], input).copy()
|
tool_input = cast(Union[str, dict], input)
|
||||||
|
if not isinstance(tool_input, str):
|
||||||
|
try:
|
||||||
|
tool_input = tool_input.copy()
|
||||||
|
except Exception as e:
|
||||||
|
import copy
|
||||||
|
tool_input = copy.deepcopy(tool_input)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
tool_input,
|
tool_input,
|
||||||
dict(
|
dict(
|
||||||
|
Loading…
Reference in New Issue
Block a user