2025-12-02 18:54:14 +08:00

15 lines
698 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 变更:修复缺失的 os 模块导入
## 原因
在移除环境变量配置支持时,错误地删除了 `app/services/dashscope_service.py` 中的 `import os` 语句。但代码中仍在使用 `os.name` 来检测操作系统类型(用于 Windows 路径处理),导致运行时错误:`name 'os' is not defined`
## 变更内容
-`app/services/dashscope_service.py` 中重新添加 `import os` 语句
- `os.name` 用于检测操作系统类型('nt' 表示 Windows这是必要的功能与环境变量无关
## 影响
- 受影响的代码:
- `app/services/dashscope_service.py` - 添加 `import os`
- 修复的错误:`name 'os' is not defined` 运行时错误