Skills¶
-
class
mindsdb_sdk.skills.RetrievalSkill(name: str, knowledge_base: str, description: str)¶ Bases:
mindsdb_sdk.skills.SkillRepresents a MindsDB skill for agents to interact with MindsDB data sources
-
class
mindsdb_sdk.skills.SQLSkill(name: str, tables: List[str], database: str)¶ Bases:
mindsdb_sdk.skills.SkillRepresents a MindsDB skill for agents to interact with MindsDB databases
-
class
mindsdb_sdk.skills.Skill(name: str, type: str, params: dict = None)¶ Bases:
objectRepresents a MindsDB skill
Working with skills:
Get a skill by name:
>>> skill = skills.get('my_skill')
List all skills:
>>> skills = skills.list()
Create a new SQL skill:
>>> text_to_sql_skill = skills.create('text_to_sql', 'sql', { 'tables': ['my_table'], 'database': 'my_database' })
Update a skill:
>>> skill.params = { 'tables': ['new_table'], 'database': 'new_database' } >>> updated_skill = skills.update('my_skill', skill)
Delete a skill by name
>>> skills.delete('my_skill')
-
classmethod
from_json(json: dict)¶
-
classmethod
-
class
mindsdb_sdk.skills.Skills(api, project: str)¶ Bases:
mindsdb_sdk.utils.objects_collection.CollectionBaseCollection for skills
-
create(name: str, type: str, params: dict = None) → mindsdb_sdk.skills.Skill¶ Create new skill and return it
- Parameters
name – Name of the skill to be created
type – Type of the skill to be created
params – Parameters for the skill to be created
- Returns
created skill object
-
drop(name: str)¶ Drop a skill by name.
- Parameters
name – Name of the skill to be dropped
-
get(name: str) → mindsdb_sdk.skills.Skill¶ Gets a skill by name.
- Parameters
name – name of the skill
- Returns
skill with the given name
-
list() → List[mindsdb_sdk.skills.Skill]¶ List available skills.
- Returns
list of skills
-
update(name: str, updated_skill: mindsdb_sdk.skills.Skill) → mindsdb_sdk.skills.Skill¶ Update a skill by name.
param name: Name of the skill to be updated :param updated_skill: Skill with updated fields
- Returns
updated skillobject
-