mirror of
https://github.com/Usagi-org/ai-goofish-monitor.git
synced 2025-11-25 03:15:07 +08:00
问题1:GET /api/tasks返回404错误 - 原因:缺少config.json配置文件 - 解决方案:从config.json.example复制创建config.json 问题2:'NoneType' object has no attribute 'strip'错误 - 原因:src/prompt_utils.py中AI返回的content可能为None,直接调用.strip()导致错误 - 解决方案:添加None值检查,提供更清晰的错误信息 修复内容: - 添加config.json配置文件以支持任务管理 - 在prompt_utils.py中添加AI响应内容的空值检查 - 当AI返回空内容时提供更有意义的错误提示 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
41 lines
1.1 KiB
JSON
41 lines
1.1 KiB
JSON
[
|
|
{
|
|
"task_name": "MacBook Air M1",
|
|
"enabled": true,
|
|
"keyword": "macbook air m1",
|
|
"max_pages": 5,
|
|
"personal_only": true,
|
|
"min_price": "3000",
|
|
"max_price": "5000",
|
|
"cron": "3 12 * * *",
|
|
"ai_prompt_base_file": "prompts/base_prompt.txt",
|
|
"ai_prompt_criteria_file": "prompts/macbook_criteria.txt",
|
|
"is_running": false
|
|
},
|
|
{
|
|
"task_name": "DJI Mini 3 Pro",
|
|
"enabled": true,
|
|
"keyword": "mini 3 pro",
|
|
"max_pages": 3,
|
|
"personal_only": true,
|
|
"ai_prompt_base_file": "prompts/base_prompt.txt",
|
|
"ai_prompt_criteria_file": "prompts/dji_mini3_criteria.txt",
|
|
"min_price": "3500",
|
|
"max_price": "4500",
|
|
"cron": "",
|
|
"is_running": false
|
|
},
|
|
{
|
|
"task_name": "婴儿车",
|
|
"enabled": false,
|
|
"keyword": "babycare 婴儿车",
|
|
"max_pages": 3,
|
|
"personal_only": true,
|
|
"min_price": "500",
|
|
"max_price": "1000",
|
|
"cron": "",
|
|
"ai_prompt_base_file": "prompts/base_prompt.txt",
|
|
"ai_prompt_criteria_file": "prompts/babycare_婴儿车_criteria.txt",
|
|
"is_running": false
|
|
}
|
|
] |