Remove duplicate lines (#7138)

I believe these two lines are unnecessary, the variable `function_call`
is already defined.
pull/7167/head
Alex Iribarren 1 year ago committed by GitHub
parent 405865c91a
commit 9cfb311ecb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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"])

@ -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:

Loading…
Cancel
Save