Update docs and scripts

This commit is contained in:
Brandon Hancock
2024-10-21 11:44:41 -04:00
parent ec70e76ab6
commit db0f2d4697
3 changed files with 16 additions and 6 deletions

View File

@@ -562,13 +562,18 @@ async def kickoff():
poem_flow = PoemFlow()
await poem_flow.kickoff()
def plot():
poem_flow = PoemFlow()
poem_flow.plot()
if __name__ == "__main__":
def main():
asyncio.run(kickoff())
if __name__ == "__main__":
main()
```
In this example, the `PoemFlow` class defines a flow that generates a sentence count, uses the `PoemCrew` to generate a poem, and then saves the poem to a file. The flow is kicked off by calling the `kickoff()` method.
@@ -669,4 +674,4 @@ Also, check out our YouTube video on how to use flows in CrewAI below!
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
></iframe>{" "}
></iframe>