Skip to content

Commit

Permalink
Update flows to handle new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bhancockio committed Oct 24, 2024
1 parent 5bc4bd0 commit 156b290
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 30 deletions.
40 changes: 21 additions & 19 deletions lead-score-flow/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
14 changes: 3 additions & 11 deletions lead-score-flow/src/lead_score_flow/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,29 +186,21 @@ async def write_email(candidate):
print(message)


async def run_flow():
def kickoff():
"""
Run the flow.
"""
lead_score_flow = LeadScoreFlow()
lead_score_flow.kickoff()


async def plot_flow():
def plot():
"""
Plot the flow.
"""
lead_score_flow = LeadScoreFlow()
lead_score_flow.plot()


def main():
asyncio.run(run_flow())


def plot():
asyncio.run(plot_flow())


if __name__ == "__main__":
main()
kickoff()

0 comments on commit 156b290

Please sign in to comment.