ai_v/services
公司git fec3426bad ```
feat(config): 添加API备用地址和密钥配置

- 新增 AI_BASE_URL 和 AI_BACKUP_BASE_URL 配置项
- 为试用、高级、视频和Gemini Flash等API添加备用密钥
- 使用f-string格式化API端点URL以支持动态基地址
- 统一API端点构建方式,提高配置灵活性

feat(services): 实现API故障自动切换机制

- 在聊天生成服务中集成多线路候选和故障转移逻辑
- 重构图像和视频生成服务以支持备用API线路
- 实现智能路由,根据状态码自动切换到备用线路
- 增强错误处理和日志记录功能

feat(utils): 新增API线路管理和切换工具函数

- 实现 get_backup_api_url() 函数用于URL备用地址转换
- 创建 get_backup_api_key() 函数管理备用密钥映射
- 开发 get_api_candidates() 函数生成主备线路候选列表
- 添加 should_switch_to_backup() 函数判断是否需要切换线路

refactor(services): 优化视频生成任务的API密钥配置

- 将视频生成任务独立使用VIDEO_KEY而非通用密钥
- 确保视频服务使用专门的API密钥进行身份验证
```
2026-04-22 11:53:00 +08:00
..
__init__.py feat: Implement core application structure with new services, blueprints, templates, and database migrations. 2026-01-17 23:15:58 +08:00
alipay_service.py feat(payment): 添加订单状态同步功能和主动查询接口 2026-01-23 17:40:23 +08:00
captcha_service.py feat: Implement a comprehensive user authentication system, add video generation capabilities, and set up database migrations and API blueprints. 2026-01-16 22:24:14 +08:00
file_service.py ``` 2026-02-02 17:05:31 +08:00
generation_service.py ``` 2026-04-22 11:53:00 +08:00
history_service.py feat: Implement user history retrieval and MinIO file proxy with updated public URL configuration. 2026-01-21 19:32:02 +08:00
logger.py feat: Add admin panel for system management, new authentication and payment blueprints, logger and stats services, and related model updates. 2026-01-18 21:09:43 +08:00
sms_service.py feat(api): 实现图像生成及后台同步功能 2026-01-12 00:53:31 +08:00
stats_service.py feat: Add admin panel for system management, new authentication and payment blueprints, logger and stats services, and related model updates. 2026-01-18 21:09:43 +08:00
system_service.py feat: Implement core application structure with new services, blueprints, templates, and database migrations. 2026-01-17 23:15:58 +08:00
task_service.py ``` 2026-04-22 11:53:00 +08:00