Package mindsdb.models.skill
Class Skill
java.lang.Object
mindsdb.models.skill.Skill
- Direct Known Subclasses:
RetrievalSkill
,SQLSkill
The Skill class represents a skill with a name, type, and parameters. It
provides constructors for creating a skill instance and methods for
converting JSON data to a Skill object.
Attributes:
- name: The name of the skill.
- type: The type of the skill.
- params: The parameters of the skill.
- Skill(String name, String type, Map<String, Object> params): Constructs a new Skill instance with the specified name, type, and parameters.
- static Skill fromJson(JsonObject json): Converts JSON data to a Skill object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateParams
(String database, List<String> tables, String description) Creates parameters for a skill with the specified database, tables, and description.describe()
Returns a string representation of the Skill object.boolean
static Skill
fromJson
(com.google.gson.JsonObject json) Converts JSON data to a Skill object.int
hashCode()
void
Update or set the parameters of the skill.toString()
-
Constructor Details
-
Skill
Constructs a new Skill instance with the specified name, type, and parameters.- Parameters:
name
- The name of the skill.type
- The type of the skill.params
- The parameters of the skill.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
-
describe
Returns a string representation of the Skill object.- Returns:
- A string representation of the Skill object.
-
fromJson
Converts JSON data to a Skill object.- Parameters:
json
- The JSON data to convert.- Returns:
- The Skill object created from the JSON data.
-
createParams
protected static Map<String,Object> createParams(String database, List<String> tables, String description) Creates parameters for a skill with the specified database, tables, and description.- Parameters:
database
- The database name.tables
- The list of table names.description
- The description of the skill.- Returns:
- The parameters for the skill.
-
setParams
Update or set the parameters of the skill.- Parameters:
params
- The parameters of the skill.
-