- Correct asynchronous behavior in the EveAICrewAI classes.

This commit is contained in:
Josako
2025-03-31 10:26:23 +02:00
parent d57bc5cf03
commit 1762b930bc
5 changed files with 49 additions and 67 deletions

View File

@@ -139,16 +139,8 @@ class RAGFlow(EveAICrewAIFlow[RAGFlowState]):
self.exception_raised = True
raise e
async def execute_async(self, inputs=None):
async with current_event.create_span_async("RAG Specialist Execution"):
self.specialist_executor.log_tuning("Inputs retrieved", inputs)
self.state.input = RAGSpecialistInput.model_validate(inputs)
self.specialist.update_progress("EveAI Flow Start", {"name": "RAG"})
try:
result = await super().kickoff_async()
except Exception as e:
current_app.logger.error(f"Error kicking of Flow: {str(e)}")
self.specialist.update_progress("EveAI Flow End", {"name": "RAG"})
return self.state
async def kickoff_async(self, inputs=None):
current_app.logger.debug(f"Async kickoff {self.name}")
self.state.input = RAGSpecialistInput.model_validate(inputs)
result = await super().kickoff_async(inputs)
return self.state