Skip to content

Commit

Permalink
Fix Recruitment Workflow (TransformerOptimus#1304)
Browse files Browse the repository at this point in the history
* Fix Recruitment Workflow

* rename step5 to step4 and step6 to step5

---------

Co-authored-by: Fluder-Paradyne <121793617+Fluder-Paradyne@users.noreply.github.com>
  • Loading branch information
luciferlinx101 and Fluder-Paradyne authored Oct 3, 2023
1 parent a5001f6 commit 2da4f0e
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 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")
"Read the resume from above input",
"Check if the resume matches High-Level GOAL")

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")
SendEmailTool().name,
"Write a custom acceptance Email to the candidates")

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 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, step4.id, "YES")
AgentWorkflowStep.add_next_workflow_step(session, step3.id, step5.id, "NO")
AgentWorkflowStep.add_next_workflow_step(session, step4.id, step2.id)
AgentWorkflowStep.add_next_workflow_step(session, step5.id, step2.id)
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 2da4f0e

Please sign in to comment.