类:LocalSkillSource
- All Implemented Interfaces:
SkillSource
从本地文件系统中加载技能数据。
-
嵌套类概述
Nested classes/interfaces inherited from class AbstractSkillSource
AbstractSkillSource.SkillMdPath<PathT>Modifier and TypeClassDescriptionstatic final class这是一个容器类(container class),用于存储技能的名称以及该技能对应的 SKILL.md 文件的路径。 -
构造函数概述
Constructors -
方法概述
Modifier and TypeMethodDescriptionprotected io.reactivex.rxjava3.core.Single<Path> findResourcePath(String skillName, String resourcePath) 返回给定技能所对应资源的路径。protected io.reactivex.rxjava3.core.Single<Path> findSkillMdPath(String skillName) 返回给定技能对应的 SKILL.md 文件的路径。io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<String>> listResources(String skillName, String resourceDirectory) 列出指定目录中某个特定技能所使用的所有资源文件。protected io.reactivex.rxjava3.core.Flowable<AbstractSkillSource.SkillMdPath<Path>> 返回一个Flowable这些技能信息以“技能名称”与对应 SKILL.md 文件的路径的形式组合在一起进行存储。protected ReadableByteChannelopenChannel(Path path) 打开一个InputStream用于读取指定路径下的内容。Methods inherited from class AbstractSkillSource
listFrontmatters, loadFrontmatter, loadInstructions, loadResourceModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableMap<String, Frontmatter>> 列出所有可用的选项。Frontmatter“s”代表已发现的技能(discovered skills)。io.reactivex.rxjava3.core.Single<Frontmatter> loadFrontmatter(String skillName) 加载……Frontmatter针对某项特定的技能(for a specific skill)。io.reactivex.rxjava3.core.Single<String> loadInstructions(String skillName) 加载特定技能的指令(即 SKILL.md 文件中的内容)。io.reactivex.rxjava3.core.Single<com.google.common.io.ByteSource> loadResource(String skillName, String resourcePath) 加载特定的资源文件内容。
-
构造函数详细信息
-
LocalSkillSource
-
-
方法详细信息(Method Details)
-
listResources
public io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<String>> listResources(String skillName, String resourceDirectory) 描述内容复制自接口文档:SkillSource列出指定目录中某个特定技能所使用的所有资源文件。如果该技能或资源目录不存在,那么返回的结果将会是……(具体内容需要根据实际情况填写)。
Single将以……结尾SkillSourceException.- Parameters:
skillName- the name of the skillresourceDirectory- the relative directory within the skill to list (e.g., "assets", "scripts")- Returns:
- a
Singleemitting a list of resource paths relative to the skill directory
-
listSkills
描述内容复制自相关类:AbstractSkillSource返回一个Flowable这些技能信息以“技能名称”与对应 SKILL.md 文件的路径的形式组合在一起进行存储。- Specified by:
listSkillsin classAbstractSkillSource<Path>
-
findResourcePath
protected io.reactivex.rxjava3.core.Single<Path> findResourcePath(String skillName, String resourcePath) 描述内容复制自相关类:AbstractSkillSource返回给定技能所对应资源的路径。- Specified by:
findResourcePathin classAbstractSkillSource<Path>
-
findSkillMdPath
描述内容复制自相关类:AbstractSkillSource返回给定技能对应的 SKILL.md 文件的路径。- Specified by:
findSkillMdPathin classAbstractSkillSource<Path>
-
openChannel
描述内容复制自相关类:AbstractSkillSource打开一个InputStream用于读取指定路径下的内容。- Specified by:
openChannelin classAbstractSkillSource<Path>- Throws:
IOException
-