Hi. Did you have any examples of executing the crew in kickoff_async_foreach / kickoff_async? please help me on this. I have tried, but the process running in background. Even though I waited for long time. I didn’t see any results.
here is the crew
@crew
def crew(self) → Crew:
“”“Creates the Bklog10Crew crew”“”
print(“crew”)
return Crew(
agents=self.agents, # Automatically created by the @agent decorator
tasks=self.tasks, # Automatically created by the @task decorator
process=Process.sequential,
verbose=True
process=Process.hierarchical, # In case you wanna use that instead Introduction - CrewAI
)
run method:
def run():
“”"
Run the crew.
“”"
inputs = {
‘FilePath’: ‘/Users/paarttipaa/ProjectTask/GithubProj/BCK_Log_SLC_Code_Explanation_Project/work/10/bklog10crew/dataset/PageData01_112.java’
}
JavaFilePath=process_directory(dirpath=os.getenv(“INPUT_DIRECTORY_PATH”))
print(JavaFilePath)
Bklog10CrewCrew().crew().kickoff_for_each_async(inputs=JavaFilePath,)
print(Bklog10CrewCrew().crew().usage_metrics)
console output:
(.agentCrewaiLatestVersions) paarttipaa@Paarttipaabhalajis-MacBook-Pro bklog10crew % crewai run
Running the Crew
warning: VIRTUAL_ENV=/Users/paarttipaa/ProjectTask/GithubProj/BCK_Log_SLC_Code_Explanation_Project/.agentCrewaiLatestVersions
does not match the project environment path .venv
and will be ignored
[{‘FilePath’: ‘/Users/paarttipaa/ProjectTask/GithubProj/BCK_Log_SLC_Code_Explanation_Project/work/10/bklog10crew/dataset/PageData01_112.java’}]
fileRetriverAgent
methodAnalyzerAgent
methodsClassifierTask
conditionalMatrixAnalystAgent
conditionalMatrixGenTask
reportingSpecialistAgent
retriveFileTask
reportingSpecialistTasks
crew
/Users/paarttipaa/ProjectTask/GithubProj/BCK_Log_SLC_Code_Explanation_Project/work/10/bklog10crew/src/bklog10crew/main.py:39: RuntimeWarning: coroutine ‘Crew.kickoff_for_each_async’ was never awaited
Bklog10CrewCrew().crew().kickoff_for_each_async(inputs=JavaFilePath)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
(.agentCrewaiLatestVersions) paarttipaa@Paarttipaabhalajis-MacBook-Pro bklog10crew %