mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
Update docs and scripts
This commit is contained in:
@@ -562,13 +562,18 @@ async def kickoff():
|
|||||||
poem_flow = PoemFlow()
|
poem_flow = PoemFlow()
|
||||||
await poem_flow.kickoff()
|
await poem_flow.kickoff()
|
||||||
|
|
||||||
|
|
||||||
def plot():
|
def plot():
|
||||||
poem_flow = PoemFlow()
|
poem_flow = PoemFlow()
|
||||||
poem_flow.plot()
|
poem_flow.plot()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
asyncio.run(kickoff())
|
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.
|
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"
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||||
referrerpolicy="strict-origin-when-cross-origin"
|
referrerpolicy="strict-origin-when-cross-origin"
|
||||||
allowfullscreen
|
allowfullscreen
|
||||||
></iframe>{" "}
|
></iframe>
|
||||||
|
|||||||
@@ -36,10 +36,15 @@ async def kickoff():
|
|||||||
poem_flow = PoemFlow()
|
poem_flow = PoemFlow()
|
||||||
await poem_flow.kickoff()
|
await poem_flow.kickoff()
|
||||||
|
|
||||||
|
|
||||||
def plot():
|
def plot():
|
||||||
poem_flow = PoemFlow()
|
poem_flow = PoemFlow()
|
||||||
poem_flow.plot()
|
poem_flow.plot()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
asyncio.run(kickoff())
|
asyncio.run(kickoff())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
{{folder_name}} = "{{folder_name}}.main:kickoff"
|
flows_kickoff_cli = "flows_kickoff_cli.main:main"
|
||||||
kickoff = "{{folder_name}}.main:kickoff"
|
kickoff = "flows_kickoff_cli.main:main"
|
||||||
plot = "{{folder_name}}.main:plot"
|
plot = "flows_kickoff_cli.main:plot"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
|
|||||||
Reference in New Issue
Block a user