plutoa386 commited on
Commit
920f9d7
·
1 Parent(s): 83f2727

potential fix to return news object type

Browse files
Files changed (1) hide show
  1. crew.py +1 -2
crew.py CHANGED
@@ -726,8 +726,7 @@ def run_crewai_news_patient(count: int = 5) -> dict:
726
  return result
727
  else:
728
  try:
729
- import json
730
- return json.loads(str(result))
731
  except:
732
  return {"status": "error", "message": "Failed to parse crew output", "raw": str(result), "resulttype": type(result)}
733
 
 
726
  return result
727
  else:
728
  try:
729
+ return result.json_dict
 
730
  except:
731
  return {"status": "error", "message": "Failed to parse crew output", "raw": str(result), "resulttype": type(result)}
732