结构化思维工具框架
一个用于增强推理能力的结构化思维工具框架,支持模板化和验证思维。
快速入门指南
-
安装依赖: npm install
-
构建项目: npm run build
-
使用示例(模板思维):
const result = await templateThinkingTool.processThought({ command: { type: 'auto-select-template', problemDescription: '需要选择 AWS 或 Azure 作为云基础设施' } }, context); console.log(result.selectedTemplate); // 输出所选模板 console.log(result.activeStep); // 当前步骤 console.log(result.formattedOutput); // 格式化输出内容
-
创建自定义模板:
const customResult = await templateThinkingTool.processThought({ command: { type: 'create-template', template: { name: 'API 安全审计', description: '用于审核 API 安全性的模板', category: 'security', steps: [ { content: '识别身份验证方法', order: 1 }, { content: '审查授权模型', order: 2 } ] } } }, context);