SuperAPI AI 工具集

create-adapter

编程与开发

查看项目

更新于 10-16 02:32

技能介绍

用途:在 Harbor 仓库中引导创建新的基准(benchmark)适配器。该技能先用 harbor adapter init 生成适配器目录骨架,随后以适配器教程 docs/content/docs/datasets/adapters.mdx(相对 Harbor 仓库根目录)作为权威规范,指导后续实现决策。

主要能力:生成 adapters/<adapter-name>/ 目录,包含 pyproject.toml、README.md、src/<adapter_name>/ 及 src/<adapter_name>/task-template/ 下的模板任务文件;并提示按教程步骤完成基准分析、oracle 验证、parity 实验、数据集注册与提交。

使用方式:前置条件为 Harbor CLI 已安装并在 PATH 中(harbor --version 成功)、工作目录为 Harbor 仓库根目录、检出为最新(git fetch origin && git status,落后则拉取 main)。先完整阅读教程,再收集适配器名称(小写连字符)、人类可读名称、上游仓库 URL、是否有 oracle 方案、agent 场景等输入。创建分支:git checkout -b <adapter-name>-adapter。运行脚手架:harbor adapter init <adapter-name> --name "<Human-Readable Name>",或交互式运行 harbor adapter init。

适用场景:为 Harbor 添加新基准适配器,覆盖已有兼容 agent、fork 上游并新增 LLM agent、自定义 agent、多 agent 工作流、GPU 任务等情形,可参考 adapters/adebench/、adapters/evoeval/、adapters/bixbench/、adapters/financeagent/、adapters/medagentbench/、adapters/cooperbench/、adapters/featurebench/ 等示例。

限制:不实现 adapter.py、main.py 或任务模板文件;不运行 oracle 验证或 parity 实验(需用户明确意图,parity 还需团队协调);不发布数据集或提交 PR。常见问题:harbor 命令未找到需安装 CLI;名称校验失败需用小写连字符;目录未生成通常是未在仓库根目录运行;本地 oracle 通过但 parity 失败多因检出过旧。其他细节以教程为准,资料未提供更多内容。