mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-03 12:07:36 +00:00
chore(core): add note about backward compatibility for tool_calls
in additional_kwargs
in JsonOutputKeyToolsParser
This commit is contained in:
@@ -246,6 +246,8 @@ class JsonOutputKeyToolsParser(JsonOutputToolsParser):
|
|||||||
_ = tool_call.pop("id")
|
_ = tool_call.pop("id")
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
# This exists purely for backward compatibility / cached messages
|
||||||
|
# All new messages should use `message.tool_calls`
|
||||||
raw_tool_calls = copy.deepcopy(message.additional_kwargs["tool_calls"])
|
raw_tool_calls = copy.deepcopy(message.additional_kwargs["tool_calls"])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
if self.first_tool_only:
|
if self.first_tool_only:
|
||||||
|
Reference in New Issue
Block a user