Skip to content

Commit

Permalink
Fix Recruitment Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
luciferlinx101 committed Oct 3, 2023
1 parent 0a24481 commit d57f107
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions superagi/agent/workflow_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def build_recruitment_workflow(cls, session):
step1 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id,
str(agent_workflow.id) + "_step1",
ListFileTool().name,
"Read files from the resource manager",
"List the files from the resource manager",
step_type="TRIGGER")

# task queue ends when the elements gets over
Expand All @@ -125,29 +125,28 @@ def build_recruitment_workflow(cls, session):
step3 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id,
str(agent_workflow.id) + "_step3",
ReadFileTool().name,
"Read the resume from above input")

step4 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id,
str(agent_workflow.id) + "_step4",
ReadFileTool().name,
"Read the job description from file mentioned in High-Level GOAL",
"Check if the resume matches the job description in goal")
"Read the resume from above input",
"Check if the resume matches High-Level GOAL")

step5 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id,
str(agent_workflow.id) + "_step5",
SendEmailTool().name,
"Write a custom Email the candidates for job profile based on their experience")
"Write a custom acceptance Email to the candidates")

step6 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id,

Check warning on line 136 in superagi/agent/workflow_seed.py

View check run for this annotation

Codecov / codecov/patch

superagi/agent/workflow_seed.py#L136

Added line #L136 was not covered by tests
str(agent_workflow.id) + "_step6",
SendEmailTool().name,
"Write a custom Reject Email to the candidates")

AgentWorkflowStep.add_next_workflow_step(session, step1.id, step2.id)
AgentWorkflowStep.add_next_workflow_step(session, step2.id, step3.id)
AgentWorkflowStep.add_next_workflow_step(session, step2.id, -1, "COMPLETE")
AgentWorkflowStep.add_next_workflow_step(session, step3.id, step4.id)
AgentWorkflowStep.add_next_workflow_step(session, step4.id, step5.id, "YES")
AgentWorkflowStep.add_next_workflow_step(session, step4.id, step2.id, "NO")
AgentWorkflowStep.add_next_workflow_step(session, step3.id, step5.id, "YES")
AgentWorkflowStep.add_next_workflow_step(session, step3.id, step6.id, "NO")

Check warning on line 145 in superagi/agent/workflow_seed.py

View check run for this annotation

Codecov / codecov/patch

superagi/agent/workflow_seed.py#L144-L145

Added lines #L144 - L145 were not covered by tests
AgentWorkflowStep.add_next_workflow_step(session, step5.id, step2.id)
AgentWorkflowStep.add_next_workflow_step(session, step6.id, step2.id)

Check warning on line 147 in superagi/agent/workflow_seed.py

View check run for this annotation

Codecov / codecov/patch

superagi/agent/workflow_seed.py#L147

Added line #L147 was not covered by tests
session.commit()


@classmethod
def build_coding_workflow(cls, session):
agent_workflow = AgentWorkflow.find_or_create_by_name(session, "SuperCoder", "SuperCoder")
Expand Down

0 comments on commit d57f107

Please sign in to comment.