Package com.microsoft.semantickernel
Interface SkillExecutor
-
- All Known Subinterfaces:
Kernel
public interface SkillExecutor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReadOnlyFunctionCollectiongetSkill(String skillName)Get function collection with the skill nameReadOnlySkillCollectiongetSkills()ReadOnlyFunctionCollectionimportSkill(Object nativeSkill, String skillName)Imports the native functions annotated on the given object as a skill.ReadOnlyFunctionCollectionimportSkill(String skillName, Map<String,SemanticFunctionConfig> skills)Import a set of skillsReadOnlyFunctionCollectionimportSkillFromDirectory(String skillName, String parentDirectory)Imports the native functions annotated on the given object as a skill.ReadOnlyFunctionCollectionimportSkillFromDirectory(String skillName, String parentDirectory, String skillDirectoryName)Imports the native functions annotated on the given object as a skill.voidimportSkillsFromDirectory(String parentDirectory, String... skillNames)Imports the native functions annotated on the given object as a skill.
-
-
-
Method Detail
-
importSkill
ReadOnlyFunctionCollection importSkill(String skillName, Map<String,SemanticFunctionConfig> skills) throws SkillsNotFoundException
Import a set of skills- Parameters:
skillName- name of the skillskills- map of skill names to skill configs- Returns:
- the function collection
- Throws:
SkillsNotFoundException- if the skill is not found
-
getSkill
ReadOnlyFunctionCollection getSkill(String skillName) throws SkillsNotFoundException
Get function collection with the skill name- Parameters:
skillName- name of the skill- Returns:
- the function collection
- Throws:
SkillsNotFoundException- if the skill is not found
-
importSkillFromDirectory
ReadOnlyFunctionCollection importSkillFromDirectory(String skillName, String parentDirectory, String skillDirectoryName)
Imports the native functions annotated on the given object as a skill.- Parameters:
skillName- name of the skill- Returns:
- the function collection
-
importSkillsFromDirectory
void importSkillsFromDirectory(String parentDirectory, String... skillNames)
Imports the native functions annotated on the given object as a skill.
-
importSkillFromDirectory
ReadOnlyFunctionCollection importSkillFromDirectory(String skillName, String parentDirectory)
Imports the native functions annotated on the given object as a skill. Assumes that the directory that contains the skill is the same as skillName- Parameters:
skillName- name of the skillparentDirectory- directory that contains the skill- Returns:
- the function collection
-
importSkill
ReadOnlyFunctionCollection importSkill(Object nativeSkill, @Nullable String skillName)
Imports the native functions annotated on the given object as a skill.- Parameters:
nativeSkill- object containing the native functionsskillName- name of the skill- Returns:
- the function collection
-
getSkills
ReadOnlySkillCollection getSkills()
- Returns:
- Reference to the read-only skill collection containing all the imported functions
-
-