Package org.machanism.machai.ai.tools
Class ParamDescriptor
java.lang.Object
org.machanism.machai.ai.tools.ParamDescriptor
Descriptor for a parameter used in tool or prompt definitions within the AI provider framework.
The ParamDescriptor class encapsulates metadata about a parameter, including its name, type,
whether it is required, and a description of its purpose or usage.
- name: The parameter's name.
- type: The parameter's data type (e.g., "String", "Integer", "JsonNode").
- required: Indicates whether the parameter is mandatory.
- description: A brief description of the parameter's purpose or usage.
This class is typically used to document and validate parameters for tool functions, prompts, or other callable entities within the framework.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParamDescriptor(String name, String type, boolean required, String description) Constructs a newParamDescriptorwith the specified properties. -
Method Summary
-
Field Details
-
Constructor Details
-
ParamDescriptor
Constructs a newParamDescriptorwith the specified properties.- Parameters:
name- the parameter's nametype- the parameter's data typerequired- whether the parameter is mandatorydescription- a brief description of the parameter's purpose or usage
-
-
Method Details
-
getName
Returns the parameter's name.- Returns:
- the name of the parameter
-
getType
Returns the parameter's data type.- Returns:
- the data type of the parameter
-
getDescription
Returns a description of the parameter's purpose or usage.- Returns:
- the parameter description
-
isRequired
public boolean isRequired()Indicates whether the parameter is required.- Returns:
trueif the parameter is mandatory;falseotherwise
-