docs: 修正文档与代码对齐问题

- 附件分类说明.md 第4节:澄清程序输出为完整记录(含
  zong_pai_hao/status/has_attachment),types 仅为分类结果字段,
  示例只截取 types 展示格式差异,消除"只输出 types"误导。
- README.md:项目结构由错误的 src/ 子目录布局改为实际根目录平铺
  (并补入已弃用的 attachment_classifier.py 旧 Excel 版);
  修正 src/prompts.py 为 prompts.py 的引用。
This commit is contained in:
Misaka_Company
2026-07-24 14:06:05 +08:00
parent 2110e6f38c
commit 4ca048bd26
2 changed files with 140 additions and 11 deletions

View File

@@ -59,7 +59,7 @@ python main.py --id 26B742 --mode fine --enable-other
- **fine**:在同一个 `types` 字段里直接给出"大类:细分类目",例如
"配件:针型阀""资料:说明书"
两种模式对应的提示词都定义在 `src/prompts.py` 中,修改分类边界或细分类目
两种模式对应的提示词都定义在 `prompts.py` 中,修改分类边界或细分类目
枚举,只需要改这一个文件。
### 分类体系(已与业务方确认边界)
@@ -186,15 +186,15 @@ JSON 的括号、引号、转义更容易被模型写错。约定 LLM 只输出"
## 项目结构
```
├── config.yaml # 配置文件
├── main.py # 命令行入口
├── config.yaml # 配置文件
├── main.py # 命令行入口(直接 import 同目录各模块)
├── requirements.txt
── src/
├── config_loader.py # YAML 配置读取与校验
├── db.py # SQL Server 查询 (pyodbc)
├── prompts.py # 提示词与细分类目枚举(唯一需要改分类边界时编辑的文件)
├── llm_client.py # LLM 调用 (OpenAI 兼容接口)
├── parser.py # LLM 输出格式校验与清洗 → 结构化数据
├── order_logger.py # 每个总排号一份的完整对话日志
└── classifier.py # 编排:查库 -> 调LLM -> 校验解析 -> 记日志 -> 组装结果
── config_loader.py # YAML 配置读取与校验
├── db.py # SQL Server 查询 (pyodbc)
├── prompts.py # 提示词与细分类目枚举(唯一需要改分类边界时编辑的文件)
├── llm_client.py # LLM 调用 (OpenAI 兼容接口)
├── parser.py # LLM 输出格式校验与清洗 → 结构化数据
├── order_logger.py # 每个总排号一份的完整对话日志
├── classifier.py # 编排:查库 -> 调LLM -> 校验解析 -> 记日志 -> 组装结果
└── attachment_classifier.py # 历史版本(旧 Excel 版,已弃用,保留仅供参考)
```