removal of json_object tool name assignment

This commit is contained in:
Lorenze Jay
2024-07-24 21:10:25 -07:00
parent 044301fca2
commit c20e628de7

View File

@@ -20,11 +20,6 @@ class CrewPydanticOutputParser(PydanticOutputParser):
# Treating edge case of function calling llm returning the name instead of tool_name
json_object = json.loads(result[0].text)
json_object["tool_name"] = (
json_object["name"]
if "tool_name" not in json_object
else json_object["tool_name"]
)
result[0].text = json.dumps(json_object)
json_object = super().parse_result(result)