Skip to content

Commit

Permalink
minor fix on converter
Browse files Browse the repository at this point in the history
  • Loading branch information
ddascal committed Nov 23, 2024
1 parent 948a79d commit caab7aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crewai/utilities/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def convert_to_model(
return result
try:
# Sanitize the result by removing any markdown code block markers added by the LLM.
result = result = result.replace('```json', '').replace('```', '').strip()
result = result.replace("```json", "").replace("```", "").strip()
escaped_result = json.dumps(json.loads(result, strict=False))
return validate_model(escaped_result, model, bool(output_json))
except json.JSONDecodeError:
Expand Down

0 comments on commit caab7aa

Please sign in to comment.