mirror of
https://github.com/crewAIInc/crewAI-examples.git
synced 2026-01-10 06:17:58 -05:00
Update flows to handle new changes
This commit is contained in:
@@ -1,25 +1,27 @@
|
||||
[tool.poetry]
|
||||
[project]
|
||||
name = "lead_score_flow"
|
||||
version = "0.1.0"
|
||||
description = "lead_score_flow using crewAI"
|
||||
authors = ["Your Name <you@example.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.10,<=3.13"
|
||||
crewai = { extras = ["tools"], version = ">=0.67.1,<1.0.0" }
|
||||
asyncio = "*"
|
||||
langchain-tools = "^0.1.34"
|
||||
crewai-tools = "^0.12.0"
|
||||
google-auth-oauthlib = "^1.2.1"
|
||||
google-api-python-client = "^2.145.0"
|
||||
pyvis = "^0.3.2"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
lead_score_flow = "lead_score_flow.main:main"
|
||||
run_flow = "lead_score_flow.main:main"
|
||||
plot_flow = "lead_score_flow.main:plot"
|
||||
authors = [
|
||||
{ name = "Your Name", email = "you@example.com" },
|
||||
]
|
||||
requires-python = ">=3.10,<=3.13"
|
||||
dependencies = [
|
||||
"crewai[tools]>=0.76.2,<1.0.0",
|
||||
"asyncio*",
|
||||
"langchain-tools>=0.1.34",
|
||||
"crewai-tools>=0.12.0",
|
||||
"google-auth-oauthlib>=1.2.1",
|
||||
"google-api-python-client>=2.145.0",
|
||||
"pyvis>=0.3.2",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
kickoff = "lead_score_flow.main:kickoff"
|
||||
plot = "lead_score_flow.main:plot"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
requires = [
|
||||
"hatchling",
|
||||
]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
@@ -186,7 +186,7 @@ class LeadScoreFlow(Flow[LeadScoreState]):
|
||||
print(message)
|
||||
|
||||
|
||||
async def run_flow():
|
||||
def kickoff():
|
||||
"""
|
||||
Run the flow.
|
||||
"""
|
||||
@@ -194,7 +194,7 @@ async def run_flow():
|
||||
lead_score_flow.kickoff()
|
||||
|
||||
|
||||
async def plot_flow():
|
||||
def plot():
|
||||
"""
|
||||
Plot the flow.
|
||||
"""
|
||||
@@ -202,13 +202,5 @@ async def plot_flow():
|
||||
lead_score_flow.plot()
|
||||
|
||||
|
||||
def main():
|
||||
asyncio.run(run_flow())
|
||||
|
||||
|
||||
def plot():
|
||||
asyncio.run(plot_flow())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
kickoff()
|
||||
|
||||
Reference in New Issue
Block a user