diff --git a/langchain/agents/openai_functions_agent/base.py b/langchain/agents/openai_functions_agent/base.py index 748222ce93..3e03297a5b 100644 --- a/langchain/agents/openai_functions_agent/base.py +++ b/langchain/agents/openai_functions_agent/base.py @@ -108,7 +108,6 @@ def _parse_ai_message(message: BaseMessage) -> Union[AgentAction, AgentFinish]: function_call = message.additional_kwargs.get("function_call", {}) if function_call: - function_call = message.additional_kwargs["function_call"] function_name = function_call["name"] try: _tool_input = json.loads(function_call["arguments"]) diff --git a/langchain/agents/openai_functions_multi_agent/base.py b/langchain/agents/openai_functions_multi_agent/base.py index 71cf2845a1..82c3712d25 100644 --- a/langchain/agents/openai_functions_multi_agent/base.py +++ b/langchain/agents/openai_functions_multi_agent/base.py @@ -107,7 +107,6 @@ def _parse_ai_message(message: BaseMessage) -> Union[List[AgentAction], AgentFin function_call = message.additional_kwargs.get("function_call", {}) if function_call: - function_call = message.additional_kwargs["function_call"] try: tools = json.loads(function_call["arguments"])["actions"] except JSONDecodeError: