Skip to main content

module aixplain.modules.agent.tool.model_tool


class ModelTool

Specialized software or resource designed to assist the AI in executing specific tasks or functions based on user commands.

Attributes:

  • function (Optional[Union[Function, Text]]): task that the tool performs.
  • supplier (Optional[Union[Dict, Supplier]]): Preferred supplier to perform the task.
  • model (Optional[Union[Text, Model]]): Model function.

method __init__

__init__(
function: Optional[Function, str] = None,
supplier: Optional[Dict, Supplier] = None,
model: Optional[str, Model] = None,
description: str = '',
**additional_info
)None

Specialized software or resource designed to assist the AI in executing specific tasks or functions based on user commands.

Args:

  • function (Optional[Union[Function, Text]]): task that the tool performs. Defaults to None.
  • supplier (Optional[Union[Dict, Supplier]]): Preferred supplier to perform the task. Defaults to None. Defaults to None.
  • model (Optional[Union[Text, Model]]): Model function. Defaults to None.
  • description (Text): Description of the tool. Defaults to "".

method to_dict

to_dict() → Dict

Converts the tool to a dictionary.


method validate

validate() → Model