docs: Fix missing await keywords in async crew kickoff methods and add llm selection guide (#2959)

This commit is contained in:
Tony Kipkemboi
2025-06-04 17:12:52 -04:00
committed by GitHub
parent 47b97d9b7f
commit 545cc2ffe4
4 changed files with 733 additions and 2 deletions

View File

@@ -325,12 +325,12 @@ for result in results:
# Example of using kickoff_async
inputs = {'topic': 'AI in healthcare'}
async_result = my_crew.kickoff_async(inputs=inputs)
async_result = await my_crew.kickoff_async(inputs=inputs)
print(async_result)
# Example of using kickoff_for_each_async
inputs_array = [{'topic': 'AI in healthcare'}, {'topic': 'AI in finance'}]
async_results = my_crew.kickoff_for_each_async(inputs=inputs_array)
async_results = await my_crew.kickoff_for_each_async(inputs=inputs_array)
for async_result in async_results:
print(async_result)
```