dataflow.api.routes.example_tool¶
Example tool for testing the tools API.
Classes¶
Input schema for calculator tool. |
|
Simple calculator tool for demonstrations. |
|
Input schema for search tool. |
Functions¶
|
Simple search function for testing. |
Module Contents¶
- class dataflow.api.routes.example_tool.CalculatorInput(/, **data: Any)¶
Bases:
pydantic.BaseModelInput schema for calculator tool.
- class dataflow.api.routes.example_tool.CalculatorTool¶
Simple calculator tool for demonstrations.
- run(expression: str, precision: int = 2) dict[str, any]¶
Evaluate a mathematical expression.
- Parameters:
expression – Mathematical expression to evaluate
precision – Number of decimal places for the result
- Returns:
Dictionary with the result and expression
- args_schema¶
- description = 'Performs mathematical calculations'¶
- name = 'calculator'¶
- class dataflow.api.routes.example_tool.SearchToolInput(/, **data: Any)¶
Bases:
pydantic.BaseModelInput schema for search tool.