-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Add capability to define and integrate custom tools using Python classes
Implement a feature that allows users to create custom tools as Python classes and seamlessly integrate them into the workflow system. This will enhance flexibility and use cases on Dria Workflows
Example:
class CustomMathTool(Tool):
name = "CustomMathTool"
description = "Performs custom mathematical operations"
def process(self, x: float, y: float, operation: str) -> float:
if operation == "add":
return x + y
elif operation == "multiply":
return x * y
else:
raise ValueError("Unsupported operation")
# Register the custom tool
register_tool(CustomMathTool)
# Use in workflow
builder.step(
id="math_operation",
tool="CustomMathTool",
inputs={"x": 5, "y": 3, "operation": "multiply"}
)Metadata
Metadata
Assignees
Labels
No labels