# Fmode 图片识别参考 参考项目:`E:\ltc-pobingfeng` 关键文件: - `AI模型导入与使用文档.md` - `src/modules/owner/nav/consultation/menchuang-agent/image-analysis.service.ts` - `src/modules/owner/nav/consultation/menchuang-agent/window-recognition.service.ts` ## 核心调用方式 参考项目使用 `fmode-ng/core` 的 `completionJSON` 做结构化 JSON 输出: ```typescript import { completionJSON } from 'fmode-ng/core'; const result = await completionJSON( systemPrompt, outputFormat, onProgress, 3, { model: 'fmode-1.6-cn', temperature: 0.1, vision: true, images: [imageUrl] } ); ``` ## 对实战二的迁移方式 P0 阶段在 Claude Code 技能里先不引入前端上传链路,流程拆为两段: 1. Claude Code 接收用户上传的量尺图,并做视觉观察。 2. 本地工具接收结构化观察结果,生成稳定的缺标记报告。 后续如果要接入前端,可复用参考项目的上传和图片 URL 识别方式: - 图片上传到可访问 URL。 - 用 `completionJSON` 加 `vision: true` 和 `images: [imageUrl]` 调模型。 - 输出固定 JSON,再交给本技能的报告工具生成业务可读结果。