- Correct asynchronous behavior in the EveAICrewAI classes.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user