fix: 工参导出去掉平台已取消的 --save-dir
平台的 download-file-all-async.py 不再接受 --save-dir,文件固定存到 /workspace。 继续传这个参数时脚本直接拒绝,所以 11 月 16 日的工参一直显示没有保存文件。
This commit is contained in:
@@ -128,22 +128,22 @@
|
||||
`permission`、`question`、`file`、`file/content`、`global/health`。
|
||||
4. 模型 `DeepSeek-V4-Flash-0731-w8a8`。消息 ID 用 `msg_` + 12 位十六进制毫秒时间 + 14 位随机字符,保证递增。
|
||||
|
||||
一个快照一个会话、一个目录 `/workspace/tasks/gc_<sha1(地市|日期) 前 12 位>/`。导出、读取、删除都只在 `/workspace` 里。
|
||||
会话结束时不论成败都先让 AI 删目录,再删会话;清理失败只记日志,不盖掉原来的错误。多个快照可以各开会话并行。
|
||||
一个快照一个会话。2026-11-23 起平台的 `download-file-all-async.py` 不再接受 `--save-dir`,文件固定存到 `/workspace` 根目录,文件名是 `gc_<sha1 前 12 位>_lte.csv`、`gc_<sha1 前 12 位>_nr.csv`。
|
||||
会话结束时不论成败都先让 AI 删掉文件名以这个任务名开头的文件,再删会话;清理失败只记日志,不盖掉原来的错误。多个快照可以各开会话并行。
|
||||
|
||||
## 提示词与核对
|
||||
|
||||
导出提示词(`export_prompt`)要点:加载 `adhoc_query` 技能;程序发起、没人回答,不询问不确认不预览;
|
||||
在技能目录下逐条执行给定命令;SQL 一个字符都不能改,也不要按技能规范重写;不得换目录和文件名;
|
||||
在技能目录下逐条执行给定命令;SQL 一个字符都不能改,也不要按技能规范重写;不得改文件名,也不得把文件移走;
|
||||
最后每条输出 `DONE <序号> <路径>` 或 `FAIL <序号> <原因>`。命令形如:
|
||||
|
||||
```bash
|
||||
python script/download-file-all-async.py --sql "select cgi, longitude, latitude, eff_from_date, eff_to_date from appdbv3.a_common_cfg_lte_cellant_d where city = '江门' and eff_from_date <= make_date(2026, 11, 1) and eff_to_date > make_date(2026, 11, 1)" --save-dir "/workspace/tasks/gc_xxx/xy" --filename "lte.csv"
|
||||
python script/download-file-all-async.py --sql "select cgi, longitude, latitude, eff_from_date, eff_to_date from appdbv3.a_common_cfg_lte_cellant_d where city = '江门' and eff_from_date <= make_date(2026, 11, 1) and eff_to_date > make_date(2026, 11, 1)" --filename "gc_xxx_lte.csv"
|
||||
```
|
||||
|
||||
程序只认工具证据,AI 回复的文字只记录不采信:
|
||||
|
||||
- 只看 bash 工具里实际执行的命令,按 `--save-dir`、`--filename` 对上文件,`--sql` 必须与下发的逐字节相同。
|
||||
- 只看 bash 工具里实际执行的命令,按 `--filename` 对上文件,`--sql` 必须与下发的逐字节相同。
|
||||
- 导出脚本输出 `文件已保存至:<路径>` 才算落盘;输出 `服务端响应体为空` 视为查询结果为空。
|
||||
- 读回 CSV 后按表头取列(脚本输出的列顺序和 SELECT 不一致),必需列要齐,列数不对的行丢弃,
|
||||
有生效日期列时每行都要满足 `eff_from_date <= 当天 < eff_to_date`。
|
||||
@@ -151,7 +151,7 @@ python script/download-file-all-async.py --sql "select cgi, longitude, latitude,
|
||||
|
||||
属性列导出时文字列写成 `replace(列::text, ',', ',') as 列`,避免字段里的英文逗号让 CSV 错列。
|
||||
|
||||
清理提示词用自然语言说明要删除的目录并要求只删这一个;直接给 `rm -rf` 命令会被平台安全规则拒绝。
|
||||
清理提示词用自然语言说明要删除 `/workspace` 下哪些文件;直接给 `rm` 命令会被平台安全规则拒绝。列一个不存在的子目录时,平台的文件接口会返回 500,所以不再去列 `tasks` 目录。
|
||||
|
||||
## 已知的坑
|
||||
|
||||
|
||||
Reference in New Issue
Block a user