From 2252f4b5c150c2fbe13addb8cd11ed3c82f3172e Mon Sep 17 00:00:00 2001 From: abhijeet Date: Tue, 3 Oct 2023 14:52:18 +0530 Subject: [PATCH 1/3] Fix Recruitment Workflow --- superagi/agent/workflow_seed.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/superagi/agent/workflow_seed.py b/superagi/agent/workflow_seed.py index 2400faac8..18a135906 100644 --- a/superagi/agent/workflow_seed.py +++ b/superagi/agent/workflow_seed.py @@ -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 @@ -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, + 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") AgentWorkflowStep.add_next_workflow_step(session, step5.id, step2.id) + AgentWorkflowStep.add_next_workflow_step(session, step6.id, step2.id) session.commit() - @classmethod def build_coding_workflow(cls, session): agent_workflow = AgentWorkflow.find_or_create_by_name(session, "SuperCoder", "SuperCoder") From 45c6076a24177b8a59d0ec43f8d7723c6c2be03f Mon Sep 17 00:00:00 2001 From: rakesh-krishna-a-s Date: Tue, 3 Oct 2023 17:15:28 +0530 Subject: [PATCH 2/3] rename step5 to step4 and step6 to step5 --- superagi/agent/workflow_seed.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/superagi/agent/workflow_seed.py b/superagi/agent/workflow_seed.py index 18a135906..21f1f42e6 100644 --- a/superagi/agent/workflow_seed.py +++ b/superagi/agent/workflow_seed.py @@ -128,12 +128,12 @@ def build_recruitment_workflow(cls, session): "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, + step4 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id, str(agent_workflow.id) + "_step5", SendEmailTool().name, "Write a custom acceptance Email to the candidates") - step6 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id, + step5 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id, str(agent_workflow.id) + "_step6", SendEmailTool().name, "Write a custom Reject Email to the candidates") @@ -141,10 +141,10 @@ def build_recruitment_workflow(cls, session): 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, step5.id, "YES") - AgentWorkflowStep.add_next_workflow_step(session, step3.id, step6.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) - AgentWorkflowStep.add_next_workflow_step(session, step6.id, step2.id) session.commit() @classmethod From 858fef918b00e046c8df4435d7730f38b9effaff Mon Sep 17 00:00:00 2001 From: rakesh-krishna-a-s Date: Tue, 3 Oct 2023 17:17:35 +0530 Subject: [PATCH 3/3] rename step5 to step4 and step6 to step5 --- superagi/agent/workflow_seed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superagi/agent/workflow_seed.py b/superagi/agent/workflow_seed.py index 21f1f42e6..137776cba 100644 --- a/superagi/agent/workflow_seed.py +++ b/superagi/agent/workflow_seed.py @@ -129,12 +129,12 @@ def build_recruitment_workflow(cls, session): "Check if the resume matches High-Level GOAL") step4 = AgentWorkflowStep.find_or_create_tool_workflow_step(session, agent_workflow.id, - str(agent_workflow.id) + "_step5", + str(agent_workflow.id) + "_step4", 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) + "_step6", + str(agent_workflow.id) + "_step5", SendEmailTool().name, "Write a custom Reject Email to the candidates")