dsh-cc/dsh-cc--packages-core-tool-structured-output ↗★ 4

@dsh-cc/tool-structured-output

StructuredOutput 工具,按调用方 JSON schema 校验并原样返回输入。 适合需模型输出结构化 JSON 的开发者;需提供 schema。

包名
@dsh-cc/tool-structured-output
兼容性
待验证
Harness 依赖范围
>=0.2.0-rc.2
Cordis 依赖范围
>=0.2.0-rc.2
版本
0.9.1-rc.1
许可证
Apache-2.0
最近更新
2026年10月13日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Usage

const tool = createStructuredOutputTool({
  type: 'object',
  additionalProperties: false,
  properties: {
    title: { type: 'string' },
    count: { type: 'integer' },
  },
  required: ['title', 'count'],
})
ctx.tools.register(tool)