PowerShell 7 环境已加载 (版本: 7.5.2)
PS C:\Users\Administrator\Desktop> pip install diskcache python-dotenv prettytable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: diskcache in e:\python310\lib\site-packages (5.6.3)
Requirement already satisfied: python-dotenv in e:\python310\lib\site-packages (1.0.1)
Requirement already satisfied: prettytable in e:\python310\lib\site-packages (3.16.0)
Requirement already satisfied: wcwidth in e:\python310\lib\site-packages (from prettytable) (0.2.13)
PS C:\Users\Administrator\Desktop> cd E:\AI_System
PS E:\AI_System> pip install diskcache python-dotenv prettytable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: diskcache in e:\python310\lib\site-packages (5.6.3)
Requirement already satisfied: python-dotenv in e:\python310\lib\site-packages (1.0.1)
Requirement already satisfied: prettytable in e:\python310\lib\site-packages (3.16.0)
Requirement already satisfied: wcwidth in e:\python310\lib\site-packages (from prettytable) (0.2.13)
PS E:\AI_System> pip install transformers diskcache python-dotenv prettytable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: transformers in e:\python310\lib\site-packages (4.37.0)
Requirement already satisfied: diskcache in e:\python310\lib\site-packages (5.6.3)
Requirement already satisfied: python-dotenv in e:\python310\lib\site-packages (1.0.1)
Requirement already satisfied: prettytable in e:\python310\lib\site-packages (3.16.0)
Requirement already satisfied: filelock in e:\python310\lib\site-packages (from transformers) (3.19.1)
Requirement already satisfied: huggingface-hub<1.0,>=0.19.3 in e:\python310\lib\site-packages (from transformers) (0.21.3)
Requirement already satisfied: numpy>=1.17 in e:\python310\lib\site-packages (from transformers) (1.26.3)
Requirement already satisfied: packaging>=20.0 in e:\python310\lib\site-packages (from transformers) (25.0)
Requirement already satisfied: pyyaml>=5.1 in e:\python310\lib\site-packages (from transformers) (6.0.2)
Requirement already satisfied: regex!=2019.12.17 in e:\python310\lib\site-packages (from transformers) (2025.7.34)
Requirement already satisfied: requests in e:\python310\lib\site-packages (from transformers) (2.31.0)
Requirement already satisfied: tokenizers<0.19,>=0.14 in e:\python310\lib\site-packages (from transformers) (0.15.2)
Requirement already satisfied: safetensors>=0.3.1 in e:\python310\lib\site-packages (from transformers) (0.4.2)
Requirement already satisfied: tqdm>=4.27 in e:\python310\lib\site-packages (from transformers) (4.67.1)
Requirement already satisfied: fsspec>=2023.5.0 in e:\python310\lib\site-packages (from huggingface-hub<1.0,>=0.19.3->transformers) (2025.7.0)
Requirement already satisfied: typing-extensions>=3.7.4.3 in e:\python310\lib\site-packages (from huggingface-hub<1.0,>=0.19.3->transformers) (4.14.1)
Requirement already satisfied: wcwidth in e:\python310\lib\site-packages (from prettytable) (0.2.13)
Requirement already satisfied: colorama in e:\python310\lib\site-packages (from tqdm>=4.27->transformers) (0.4.6)
Requirement already satisfied: charset-normalizer<4,>=2 in e:\python310\lib\site-packages (from requests->transformers) (3.4.3)
Requirement already satisfied: idna<4,>=2.5 in e:\python310\lib\site-packages (from requests->transformers) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in e:\python310\lib\site-packages (from requests->transformers) (2.5.0)
Requirement already satisfied: certifi>=2017.4.17 in e:\python310\lib\site-packages (from requests->transformers) (2025.8.3)
PS E:\AI_System> # 使用配置系统
PS E:\AI_System> from core.config import config
ParserError:
Line |
1 | from core.config import config
| ~~~~
| The 'from' keyword is not supported in this version of the language.
PS E:\AI_System> loader = ModelLoader(config=config)
config=config: The term 'config=config' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS E:\AI_System>
PS E:\AI_System> # 加载默认模型
PS E:\AI_System> model, tokenizer = loader.get_cognitive_model()
ParserError:
Line |
1 | model, tokenizer = loader.get_cognitive_model()
| ~
| Missing argument in parameter list.
PS E:\AI_System>
PS E:\AI_System> # 加载其他模型
PS E:\AI_System> model2, tokenizer2 = loader.load_model("deepseek-7b-chat")
ParserError:
Line |
1 | model2, tokenizer2 = loader.load_model("deepseek-7b-chat")
| ~
| Missing argument in parameter list.
PS E:\AI_System>
PS E:\AI_System> # 切换模型
PS E:\AI_System> loader.switch_model("Qwen2-7B")
loader.switch_model: The term 'loader.switch_model' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS E:\AI_System>
PS E:\AI_System> # 卸载不用的模型
PS E:\AI_System> loader.unload_model("deepseek-7b-chat")
loader.unload_model: The term 'loader.unload_model' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS E:\AI_System> venv\Scripts\activate # 激活虚拟环境
(venv) PS E:\AI_System> python main.py # 启动系统
2025-08-27 22:56:12,130 - CoreConfig - INFO - 📂 从 E:\AI_System\config\default.json 加载配置: {
"LOG_DIR": "E:/AI_System/logs",
"CONFIG_DIR": "E:/AI_System/config",
"MODEL_CACHE_DIR": "E:/AI_System/model_cache",
"AGENT_NAME": "\u5c0f\u84dd",
"DEFAULT_USER": "\u7ba1\u7406\u5458",
"MAX_WORKERS": 4,
"AGENT_RESPONSE_TIMEOUT": 30.0,
"MODEL_BASE_PATH": "E:/AI_Models",
"MODEL_PATHS": {
"TEXT_BASE": "E:/AI_Models/Qwen2-7B",
"TEXT_CHAT": "E:/AI_Models/deepseek-7b-chat",
"MULTIMODAL": "E:/AI_Models/deepseek-vl2",
"IMAGE_GEN": "E:/AI_Models/sdxl",
"YI_VL": "E:/AI_Models/yi-vl",
"STABLE_DIFFUSION": "E:/AI_Models/stable-diffusion-xl-base-1.0"
},
"NETWORK": {
"HOST": "0.0.0.0",
"FLASK_PORT": 8000,
"GRADIO_PORT": 7860
},
"DATABASE": {
"DB_HOST": "localhost",
"DB_PORT": 5432,
"DB_NAME": "ai_system",
"DB_USER": "ai_user",
"DB_PASSWORD": "secure_password_here"
},
"SECURITY": {
"SECRET_KEY": "generated-secret-key-here"
},
"ENVIRONMENT": {
"ENV": "dev",
"LOG_LEVEL": "DEBUG",
"USE_GPU": true
},
"DIRECTORIES": {
"DEFAULT_MODEL": "E:/AI_Models/Qwen2-7B",
"WEB_UI_DIR": "E:/AI_System/web_ui",
"AGENT_DIR": "E:/AI_System/agent",
"PROJECT_ROOT": "E:/AI_System"
}
}
2025-08-27 22:56:12,130 - CoreConfig - INFO - 📂 从 E:\AI_System\config\local.json 加载配置: {}
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🌐 从 E:\AI_System\.env 加载环境变量
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_ROOT=E:\AI_System
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__PROJECT_ROOT=E:\AI_System
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__AGENT_DIR=E:\AI_System\agent
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__WEB_UI_DIR=E:\AI_System\web_ui
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__DEFAULT_MODEL=E:\AI_Models\Qwen2-7B
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_ENVIRONMENT__LOG_LEVEL=DEBUG
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_HOST=localhost
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_PORT=5432
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_NAME=ai_system
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_USER=ai_user
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_PASSWORD=******
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_SECURITY__SECRET_KEY=******
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__TEXT_BASE=E:\AI_Models\Qwen2-7B
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__TEXT_CHAT=E:\AI_Models\deepseek-7b-chat
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__MULTIMODAL=E:\AI_Models\deepseek-vl2
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__IMAGE_GEN=E:\AI_Models\sdxl
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__YI_VL=E:\AI_Models\yi-vl
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__STABLE_DIFFUSION=E:\AI_Models\stable-diffusion-xl-base-1.0
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__HOST=0.0.0.0
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__FLASK_PORT=8000
2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__GRADIO_PORT=7860
2025-08-27 22:56:12,133 - CoreConfig - WARNING - ⚠️ 模型路径不存在: STABLE_DIFFUSION = E:/AI_Models/stable-diffusion-xl-base-1.0
2025-08-27 22:56:12,133 - CoreConfig - INFO - ✅ 配置系统初始化完成
2025-08-27 22:56:12,133 - ModelManager - ERROR - ❌ 关键依赖缺失: No module named 'diskcache'
2025-08-27 22:56:12,133 - ModelManager - WARNING - ⚠️ 使用简化缓存系统
2025-08-27 22:56:12,133 - ModelManager - INFO - ✅ 备用下载系统初始化完成
2025-08-27 22:56:12,133 - ModelManager - INFO - ✅ 成功导入BaseModel
2025-08-27 22:56:13,287 - ModelManager - INFO - ✅ 成功导入ModelLoader
2025-08-27 22:56:13,289 - CognitiveArchitecture - INFO - ✅ 成功从core.base_module导入CognitiveModule基类
2025-08-27 22:56:13,292 - CognitiveArchitecture - WARNING - ⚠️ 相对路径导入失败: No module named 'agent.cognitive_modules'
2025-08-27 22:56:13,292 - CognitiveArchitecture - ERROR - ❌ 绝对路径导入失败: No module named 'agent.cognitive_modules'
2025-08-27 22:56:13,292 - CognitiveArchitecture - WARNING - ⚠️ 使用占位符自我认知模块
2025-08-27 22:56:13,297 - Main - INFO - ==================================================
2025-08-27 22:56:13,297 - Main - INFO - 🚀 启动AI系统
2025-08-27 22:56:13,297 - Main - INFO - ==================================================
系统配置摘要:
+--------------------------+-----------------------+
| 配置路径 | 值 |
+--------------------------+-----------------------+
| AGENT_NAME | 小蓝 |
| DIRECTORIES.PROJECT_ROOT | E:\AI_System |
| LOG_DIR | E:/AI_System/logs |
| AGENT_DIR | 未设置 |
| WEB_UI_DIR | 未设置 |
| NETWORK.HOST | 0.0.0.0 |
| NETWORK.FLASK_PORT | 8000 |
| MODEL_PATHS.TEXT_BASE | E:/AI_Models/Qwen2-7B |
| ENVIRONMENT.USE_GPU | True |
| ENVIRONMENT.LOG_LEVEL | DEBUG |
+--------------------------+-----------------------+
2025-08-27 22:56:13,353 - Main - INFO - ✅ 启动前检查通过
2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: core
2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: utils
2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: config
2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: cognitive_arch
2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: environment
2025-08-27 22:56:13,353 - Main - INFO - 📁 项目根目录: E:\AI_System
2025-08-27 22:56:13,354 - CoreConfig - WARNING - ⚠️ 模型路径不存在: STABLE_DIFFUSION = E:/AI_Models/stable-diffusion-xl-base-1.0
2025-08-27 22:56:13,354 - Main - INFO - 模型验证结果: 5/6 个模型有效
2025-08-27 22:56:13,354 - Main - INFO - TEXT_BASE ✅ 有效 (E:\AI_Models\Qwen2-7B)
2025-08-27 22:56:13,354 - Main - INFO - TEXT_CHAT ✅ 有效 (E:\AI_Models\deepseek-7b-chat)
2025-08-27 22:56:13,354 - Main - INFO - MULTIMODAL ✅ 有效 (E:\AI_Models\deepseek-vl2)
2025-08-27 22:56:13,354 - Main - INFO - IMAGE_GEN ✅ 有效 (E:\AI_Models\sdxl)
2025-08-27 22:56:13,354 - Main - INFO - YI_VL ✅ 有效 (E:\AI_Models\yi-vl)
2025-08-27 22:56:13,354 - Main - INFO - STABLE_DIFFUSION ❌ 无效 (E:\AI_Models\stable-diffusion-xl-base-1.0)
2025-08-27 22:56:13,354 - ModelManager - INFO - 创建简化缓存系统: E:/AI_System/model_cache
2025-08-27 22:56:13,354 - ModelManager - INFO - ✅ 模型缓存初始化完成 | 路径: E:/AI_System/model_cache
2025-08-27 22:56:13,354 - ModelManager - INFO - ✅ 成功导入ModelLoader类
2025-08-27 22:56:13,354 - ModelManager - INFO - 📦 初始化模型管理器 | 设备: cuda | 模型目录: models | 缓存目录: E:/AI_System/model_cache | 默认模型: E:\AI_Models\Qwen2-7B
2025-08-27 22:56:13,354 - ModelManager - INFO - 🔄 正在加载核心语言模型: E:\AI_Models\Qwen2-7B
2025-08-27 22:56:13,354 - ModelManager - ERROR - ❌ 使用ModelLoader加载认知模型失败: 'str' object has no attribute 'get'
2025-08-27 22:56:13,354 - ModelManager - ERROR - ❌ 加载模型失败: join() argument must be str, bytes, or os.PathLike object, not 'int'
2025-08-27 22:56:13,354 - Main - INFO - ✅ 模型管理器初始化完成 | 设备: cuda | 默认模型: E:\AI_Models\Qwen2-7B
2025-08-27 22:56:13,355 - Main - WARNING - ⚠️ 硬件监控模块缺失,跳过启动
2025-08-27 22:56:13,355 - Main - WARNING - ⚠️ 生活调度模块缺失,跳过启动
2025-08-27 22:56:13,356 - Main - INFO - ✅ 环境管理器已启动
WARNING:root:快捷方式目标不存在: E:\AI_Workspace\03_前端交互\前端代码.lnk -> E:\AI_System\agent\web_ui
WARNING:root:快捷方式目标不存在: E:\AI_Workspace\03_前端交互\配置文件.lnk -> E:\AI_System\agent\config
2025-08-27 22:56:13,377 - WebServer - INFO - ============================================================
INFO:WebServer:============================================================
2025-08-27 22:56:13,377 - WebServer - INFO - 模型存储路径: E:\AI_Models
INFO:WebServer:模型存储路径: E:\AI_Models
2025-08-27 22:56:13,377 - WebServer - INFO - 智能体系统路径: E:\AI_System\agent
INFO:WebServer:智能体系统路径: E:\AI_System\agent
2025-08-27 22:56:13,377 - WebServer - INFO - Web UI路径: E:\AI_System\agent
INFO:WebServer:Web UI路径: E:\AI_System\agent
2025-08-27 22:56:13,377 - WebServer - INFO - 配置路径: E:\AI_System\agent
INFO:WebServer:配置路径: E:\AI_System\agent
2025-08-27 22:56:13,377 - WebServer - INFO - 主模型路径: E:\AI_Models\Qwen2-7B
INFO:WebServer:主模型路径: E:\AI_Models\Qwen2-7B
2025-08-27 22:56:13,377 - WebServer - INFO - 备用模型路径: E:\AI_Models\deepseek-7b-chat
INFO:WebServer:备用模型路径: E:\AI_Models\deepseek-7b-chat
2025-08-27 22:56:13,377 - WebServer - INFO - ============================================================
INFO:WebServer:============================================================
2025-08-27 22:56:13,377 - WebServer - INFO - 强制启用离线模式
INFO:WebServer:强制启用离线模式
2025-08-27 22:56:13,379 - Main - INFO - 🌐 启动Web服务器: http://0.0.0.0:8000
INFO:Main:🌐 启动Web服务器: http://0.0.0.0:8000
2025-08-27 22:56:13,379 - WebServer - INFO - ============================================================
INFO:WebServer:============================================================
2025-08-27 22:56:13,379 - WebServer - INFO - 🚀 启动Web服务器 (星型架构)
INFO:WebServer:🚀 启动Web服务器 (星型架构)
2025-08-27 22:56:13,379 - WebServer - INFO - ============================================================
INFO:WebServer:============================================================
2025-08-27 22:56:13,888 - PlasticCore - INFO - 可塑核心初始化完成
INFO:PlasticCore:可塑核心初始化完成
2025-08-27 22:56:13,888 - WebServer - INFO - ✅ 核心接口已初始化
INFO:WebServer:✅ 核心接口已初始化
2025-08-27 22:56:13,888 - PlasticCore - WARNING - 核心系统已在运行中
WARNING:PlasticCore:核心系统已在运行中
2025-08-27 22:56:13,889 - WebServer - INFO - ✅ 核心系统已启动
INFO:WebServer:✅ 核心系统已启动
2025-08-27 22:56:13,890 - WebServer - INFO - 🔄 健康监控线程已启动
INFO:WebServer:🔄 健康监控线程已启动
2025-08-27 22:56:13,890 - WebServer - INFO - 📊 系统监控已启动
INFO:WebServer:📊 系统监控已启动
2025-08-27 22:56:13,890 - WebServer - INFO - 🌐 Web服务器运行在 0.0.0.0:8000
INFO:WebServer:🌐 Web服务器运行在 0.0.0.0:8000
* Serving Flask app 'web_ui.server'
* Debug mode: off
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://192.168.10.140:8000
INFO:werkzeug:Press CTRL+C to quit
2025-08-27 22:56:16,939 - WebServer - INFO - 正在关闭系统...
INFO:WebServer:正在关闭系统...
2025-08-27 22:56:18,918 - PlasticCore - INFO - 开始关闭核心系统...
INFO:PlasticCore:开始关闭核心系统...
2025-08-27 22:56:18,918 - PlasticCore - INFO - 核心系统已关闭
INFO:PlasticCore:核心系统已关闭
2025-08-27 22:56:18,919 - WebServer - INFO - 系统已安全关闭
INFO:WebServer:系统已安全关闭
(venv) PS E:\AI_System> python diagnose_modules.py
============================================================
模块文件诊断报告
============================================================
🔍 检查 CognitiveSystem 模块:
预期路径: E:\AI_System\agent\cognitive_architecture.py
✅ 文件存在
⚠️ 文件中包含相对导入,可能导致导入错误
✅ 找到类定义: class CognitiveSystem
✅ 类继承CognitiveModule
✅ 找到__init__方法
📋 初始化方法: def __init__(self, name):
🔍 检查 EnvironmentInterface 模块:
预期路径: E:\AI_System\agent\environment_interface.py
✅ 文件存在
✅ 找到类定义: class EnvironmentInterface
✅ 类继承CognitiveModule
✅ 找到__init__方法
📋 初始化方法: def __init__(self, coordinator=None, config=None):
🔍 检查 AffectiveSystem 模块:
预期路径: E:\AI_System\agent\affective_system.py
✅ 文件存在
✅ 找到类定义: class AffectiveSystem
✅ 类继承CognitiveModule
✅ 找到__init__方法
📋 初始化方法: def __init__(self, coordinator=None, config=None):
============================================================
建议解决方案:
============================================================
1. 检查每个模块文件中的相对导入语句
2. 确保每个模块类都正确继承CognitiveModule
3. 检查初始化方法的参数是否正确
4. 确保模块内部的导入使用绝对路径或正确处理相对导入
5. 考虑使用try-catch包装模块内部的导入语句
(venv) PS E:\AI_System> python test_core_import.py
E:\Python310\python.exe: can't open file 'E:\\AI_System\\test_core_import.py': [Errno 2] No such file or directory
(venv) PS E:\AI_System> python diagnose_architecture.py
2025-08-27 22:56:29,135 - CoreConfig - INFO - 📂 从 E:\AI_System\config\default.json 加载配置: {
"LOG_DIR": "E:/AI_System/logs",
"CONFIG_DIR": "E:/AI_System/config",
"MODEL_CACHE_DIR": "E:/AI_System/model_cache",
"AGENT_NAME": "\u5c0f\u84dd",
"DEFAULT_USER": "\u7ba1\u7406\u5458",
"MAX_WORKERS": 4,
"AGENT_RESPONSE_TIMEOUT": 30.0,
"MODEL_BASE_PATH": "E:/AI_Models",
"MODEL_PATHS": {
"TEXT_BASE": "E:/AI_Models/Qwen2-7B",
"TEXT_CHAT": "E:/AI_Models/deepseek-7b-chat",
"MULTIMODAL": "E:/AI_Models/deepseek-vl2",
"IMAGE_GEN": "E:/AI_Models/sdxl",
"YI_VL": "E:/AI_Models/yi-vl",
"STABLE_DIFFUSION": "E:/AI_Models/stable-diffusion-xl-base-1.0"
},
"NETWORK": {
"HOST": "0.0.0.0",
"FLASK_PORT": 8000,
"GRADIO_PORT": 7860
},
"DATABASE": {
"DB_HOST": "localhost",
"DB_PORT": 5432,
"DB_NAME": "ai_system",
"DB_USER": "ai_user",
"DB_PASSWORD": "secure_password_here"
},
"SECURITY": {
"SECRET_KEY": "generated-secret-key-here"
},
"ENVIRONMENT": {
"ENV": "dev",
"LOG_LEVEL": "DEBUG",
"USE_GPU": true
},
"DIRECTORIES": {
"DEFAULT_MODEL": "E:/AI_Models/Qwen2-7B",
"WEB_UI_DIR": "E:/AI_System/web_ui",
"AGENT_DIR": "E:/AI_System/agent",
"PROJECT_ROOT": "E:/AI_System"
}
}
2025-08-27 22:56:29,136 - CoreConfig - INFO - 📂 从 E:\AI_System\config\local.json 加载配置: {}
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🌐 从 E:\AI_System\.env 加载环境变量
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_ROOT=E:\AI_System
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__PROJECT_ROOT=E:\AI_System
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__AGENT_DIR=E:\AI_System\agent
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__WEB_UI_DIR=E:\AI_System\web_ui
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__DEFAULT_MODEL=E:\AI_Models\Qwen2-7B
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_ENVIRONMENT__LOG_LEVEL=DEBUG
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_HOST=localhost
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_PORT=5432
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_NAME=ai_system
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_USER=ai_user
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_PASSWORD=******
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_SECURITY__SECRET_KEY=******
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__TEXT_BASE=E:\AI_Models\Qwen2-7B
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__TEXT_CHAT=E:\AI_Models\deepseek-7b-chat
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__MULTIMODAL=E:\AI_Models\deepseek-vl2
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__IMAGE_GEN=E:\AI_Models\sdxl
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__YI_VL=E:\AI_Models\yi-vl
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__STABLE_DIFFUSION=E:\AI_Models\stable-diffusion-xl-base-1.0
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__HOST=0.0.0.0
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__FLASK_PORT=8000
2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__GRADIO_PORT=7860
2025-08-27 22:56:29,138 - CoreConfig - WARNING - ⚠️ 模型路径不存在: STABLE_DIFFUSION = E:/AI_Models/stable-diffusion-xl-base-1.0
2025-08-27 22:56:29,138 - CoreConfig - INFO - ✅ 配置系统初始化完成
2025-08-27 22:56:29,138 - ModelManager - ERROR - ❌ 关键依赖缺失: No module named 'diskcache'
2025-08-27 22:56:29,138 - ModelManager - WARNING - ⚠️ 使用简化缓存系统
2025-08-27 22:56:29,138 - ModelManager - INFO - ✅ 备用下载系统初始化完成
2025-08-27 22:56:29,138 - ModelManager - INFO - ✅ 成功导入BaseModel
2025-08-27 22:56:30,266 - ModelManager - INFO - ✅ 成功导入ModelLoader
2025-08-27 22:56:30,268 - CognitiveArchitecture - INFO - ✅ 成功从core.base_module导入CognitiveModule基类
2025-08-27 22:56:30,268 - CognitiveArchitecture - WARNING - ⚠️ 相对路径导入失败: No module named 'agent.cognitive_modules'
2025-08-27 22:56:30,268 - CognitiveArchitecture - ERROR - ❌ 绝对路径导入失败: No module named 'agent.cognitive_modules'
2025-08-27 22:56:30,268 - CognitiveArchitecture - WARNING - ⚠️ 使用占位符自我认知模块
============================================================
AI系统架构诊断报告
============================================================
2025-08-27 22:56:30,277 - CognitiveArchitecture - INFO - ✅ 成功从core.base_module导入CognitiveModule基类
2025-08-27 22:56:30,277 - CognitiveArchitecture - INFO - ✅ 成功从core.base_module导入CognitiveModule基类
2025-08-27 22:56:30,277 - CognitiveArchitecture - WARNING - ⚠️ 相对路径导入失败: attempted relative import with no known parent package
2025-08-27 22:56:30,277 - CognitiveArchitecture - WARNING - ⚠️ 相对路径导入失败: attempted relative import with no known parent package
2025-08-27 22:56:30,277 - CognitiveArchitecture - ERROR - ❌ 绝对路径导入失败: No module named 'agent.cognitive_modules'
2025-08-27 22:56:30,277 - CognitiveArchitecture - ERROR - ❌ 绝对路径导入失败: No module named 'agent.cognitive_modules'
2025-08-27 22:56:30,277 - CognitiveArchitecture - WARNING - ⚠️ 使用占位符自我认知模块
2025-08-27 22:56:30,277 - CognitiveArchitecture - WARNING - ⚠️ 使用占位符自我认知模块
1. 模块文件检查:
----------------------------------------
✅ CognitiveSystem: E:\AI_System\agent\cognitive_architecture.py
✅ EnvironmentInterface: E:\AI_System\agent\environment_interface.py
✅ AffectiveSystem: E:\AI_System\agent\affective_system.py
2. Agent目录结构 (E:\AI_System\agent):
----------------------------------------
📄 action_executor.py
📁 affective_modules/
📄 affective_system.py
📄 agent_core.log
📄 agent_core.py
📄 autonomous_agent.py
📄 auto_backup.bat
📄 cognitive_architecture.py
📁 cognitive_system/
📄 communication_system.py
📄 conscious_framework.py
📁 conscious_system/
📁 decision_system/
📄 enhanced_cognitive.py
📄 environment.py
📄 environment_interface.py
📄 env_loader.py
📁 generated_images/
📄 health_system.py
📄 knowledge graph.db
📁 knowledge_system/
📄 main.py
📄 maintain_workspace.py
📄 memory_manager.py
📁 memory_system/
📄 meta_cognition.py
📄 minimal_model.py
📁 models/
📄 model_learning.py
📄 model_manager.py
📄 notepad
📄 performance_monitor.py
📄 pip
📄 security_manager.py
📄 self_growth.bat
📄 shortcut_resolver.py
📄 system_maintain.bat
📁 tests/
📄 test_my_models.py
📁 text_results/
📄 unified_learning.py
📁 utils/
📄 world_view.py
📄 __init__.py
📁 __pycache__/
3. 建议下一步:
----------------------------------------
📍 所有模块文件都存在,需要检查模块实现内容
诊断完成
(venv) PS E:\AI_System>