类class
agentscope.skillLocalSkillLoader
class LocalSkillLoader(SkillLoaderBase)
源码Source
agentscope/skill/_local_loader.py:16–175本地技能加载器,让智能体以受控方式调用外部能力。位于 agentscope.skill 包,继承自 SkillLoaderBase。核心成员包括 list_skills。
The skill loader that loads skills from a local directory. Declared in agentscope.skill. Extends SkillLoaderBase.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
def __init__(directory: str, scan_subdir: bool = False) -> None | 初始化 `LocalSkillLoader` 实例。 Initialize the loader with the directory. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
async def list_skills() -> list[Skill]async | 列出技能。 List all the available skills from the directory. |
构造器详情Constructor Detail
LocalSkillLoader
def __init__(directory: str, scan_subdir: bool = False) -> None
初始化 LocalSkillLoader 实例。
Initialize the loader with the directory.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
directory | str | 目录到加载技能来自。The directory to load skills from. |
scan_subdir默认default False | bool | scan subdir(类型 `bool`)。Whether to scan subdirectories. Defaults to False (only scan current directory). |
源码Source
agentscope/skill/_local_loader.py:19–31方法详情Method Detail
list_skills
async def list_skills() -> list[Skill]
async
列出技能。
This method will: 1.
list[Skill]
返回技能列表。`list[Skill]`: A list of Skill objects.
源码Source
agentscope/skill/_local_loader.py:103–175