Create nodes

This commit is contained in:
Luan Citta
2024-06-05 09:00:11 +01:00
parent 990e837eb0
commit 3235e9d502
6 changed files with 152 additions and 2 deletions
+28
View File
@@ -0,0 +1,28 @@
from crewai import Task
class TaskNode:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"description": ("STRING", {"default": ""}),
"expected_output": ("STRING", {"default": ""}),
"agent": ("AGENT",),
},
}
RETURN_TYPES = ("TASK",)
FUNCTION = "create_task"
CATEGORY = "📎CrewAi"
def create_task(self, description, expected_output, agent):
task = Task(
description=description,
expected_output=expected_output,
agent=agent
)
return (task,)