mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-13 10:08:29 +00:00
Fix issue #2487: Ensure LLM errors are properly raised in async context
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -684,7 +684,10 @@ class Crew(BaseModel):
|
||||
|
||||
async def kickoff_async(self, inputs: Optional[Dict[str, Any]] = {}) -> CrewOutput:
|
||||
"""Asynchronous kickoff method to start the crew execution."""
|
||||
return await asyncio.to_thread(self.kickoff, inputs)
|
||||
try:
|
||||
return await asyncio.to_thread(self.kickoff, inputs)
|
||||
except Exception as e:
|
||||
raise
|
||||
|
||||
async def kickoff_for_each_async(self, inputs: List[Dict]) -> List[CrewOutput]:
|
||||
crew_copies = [self.copy() for _ in inputs]
|
||||
|
||||
Reference in New Issue
Block a user