技能库

readFile()

api.agents.skills.readFile(name, file) → Promise<File>

一种技能的额外文件——模板、核对表、参考表格。 计算机技能:账户技能是一份文件。

skills onlycomputer onlylisted by get()
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const skill = await api.agents.skills.get("release-notes");
console.log(skill.files);        // ["template.md", "examples.md"]

const template = await api.agents.skills.readFile("release-notes", "template.md");
skill = api.agents.skills.get("release-notes")
print(skill.get("files"))        # ["template.md", "examples.md"]

template = api.agents.skills.read_file("release-notes", "template.md")

为何存在额外文件

其保存方式使身体保持短短。 模板或长的参考材料除了技能之外,还属于其内部,而不是内部—— 即一旦技术被装入,身体即迅速,文件在打开之前不花费任何费用。

代理商也用同样的方式打开

skill { name, file } 技能负荷时列出文件姓名,这是双方的一个工具。

错误

代码状态触发条件
not_a_skill400调用子试剂库,只有技能才有文件
path_not_found404这里没有磁盘, 或在技能文件夹中没有此文件 。
账户技能解答 path_not_found

这是一份单一的文件——除了它之外,没有任何东西。 信息说,它不是暗示文件丢失,而是暗示文件丢失。