mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-09 04:28:16 +00:00
When using akickoff() (async workflow), the _export_output method and _ainvoke_guardrail_function were calling synchronous llm.call() through the converter module, which blocks the event loop. Changes: - Add ato_pydantic() and ato_json() async methods to Converter class that use llm.acall() instead of llm.call() - Add async utility functions: aconvert_to_model(), ahandle_partial_json(), aconvert_with_instructions() - Add _aexport_output() async method to Task class - Wire _aexport_output into _aexecute_core and _ainvoke_guardrail_function replacing the sync _export_output calls in async paths - Add comprehensive async tests covering all new async converter paths Fixes #5230 Co-Authored-By: João <joao@crewai.com>