neuro-simulator 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ import json
8
8
  import logging
9
9
  import re
10
10
  import sys
11
+ from pathlib import Path
11
12
  from datetime import datetime
12
13
  from typing import Any, Dict, List, Optional
13
14
 
@@ -94,28 +95,20 @@ class Agent:
94
95
  if tool.get("name") == "speak" and tool.get("result"):
95
96
  assistant_responses.append(tool["result"])
96
97
 
97
- # Create LLM prompt
98
- prompt_parts = [
99
- f"You are {self.memory_manager.init_memory.get('name', 'Neuro-Sama')}, an AI VTuber.",
100
- f"Your personality: {self.memory_manager.init_memory.get('personality', 'Friendly and curious')}",
101
- "\n=== CONTEXT ===", context,
102
- "\n=== AVAILABLE TOOLS ===", tool_descriptions,
103
- "\n=== YOUR RECENT SPEAK HISTORY (for context) ==="
104
- ]
105
- for response in assistant_responses[:5]: # Get last 5 responses
106
- prompt_parts.append(f"- {response}")
107
-
108
- prompt_parts.extend([
109
- "\n=== INSTRUCTIONS ===",
110
- "Process the user messages and respond. Use the 'speak' tool to talk to the user.",
111
- "You are fully responsible for managing your own memory using the available tools.",
112
- "\nUser messages to respond to:",
113
- ])
98
+ # Create LLM prompt from template
99
+ template_path = Path(self.memory_manager.memory_dir).parent / "prompt_template.txt"
100
+ with open(template_path, 'r', encoding='utf-8') as f:
101
+ prompt_template = f.read()
114
102
 
115
- for msg in messages:
116
- prompt_parts.append(f"{msg['username']}: {msg['text']}")
117
- prompt_parts.append("\nYour response (use tools as needed):")
118
- prompt = "\n".join(prompt_parts)
103
+ recent_speak_history_text = "\n".join([f"- {response}" for response in assistant_responses[:5]]) if assistant_responses else "You haven't said anything yet."
104
+ user_messages_text = "\n".join([f"{msg['username']}: {msg['text']}" for msg in messages])
105
+
106
+ prompt = prompt_template.format(
107
+ full_context=context,
108
+ tool_descriptions=tool_descriptions,
109
+ recent_speak_history=recent_speak_history_text,
110
+ user_messages=user_messages_text
111
+ )
119
112
 
120
113
  await self.memory_manager.add_detailed_context_entry(
121
114
  input_messages=messages, prompt=prompt, llm_response="", tool_executions=[],
@@ -33,7 +33,7 @@ async def start_stream():
33
33
  async def stop_stream():
34
34
  """Stops the live stream processes."""
35
35
  if process_manager.is_running:
36
- process_manager.stop_live_processes()
36
+ await process_manager.stop_live_processes()
37
37
  return {"status": "success", "message": "Stream stopped"}
38
38
  else:
39
39
  return {"status": "info", "message": "Stream is not running"}
@@ -41,7 +41,7 @@ async def stop_stream():
41
41
  @router.post("/restart", dependencies=[Depends(get_api_token)])
42
42
  async def restart_stream():
43
43
  """Restarts the live stream processes."""
44
- process_manager.stop_live_processes()
44
+ await process_manager.stop_live_processes()
45
45
  await asyncio.sleep(1) # Give time for tasks to cancel
46
46
  process_manager.start_live_processes()
47
47
  return {"status": "success", "message": "Stream restarted"}
neuro_simulator/cli.py CHANGED
@@ -57,7 +57,13 @@ def main():
57
57
  # 2. Ensure required assets and configs exist
58
58
  copy_resource('neuro_simulator', 'core/config.yaml.example', work_dir / 'config.yaml.example')
59
59
  copy_resource('neuro_simulator', 'assets', work_dir / 'assets', is_dir=True)
60
- agent_memory_dir = work_dir / "agent" / "memory"
60
+ # Ensure agent directory and its contents exist
61
+ agent_dir = work_dir / "agent"
62
+ agent_dir.mkdir(parents=True, exist_ok=True)
63
+ copy_resource('neuro_simulator', 'agent/prompt_template.txt', agent_dir / 'prompt_template.txt')
64
+
65
+ # Ensure agent memory directory and its contents exist
66
+ agent_memory_dir = agent_dir / "memory"
61
67
  agent_memory_dir.mkdir(parents=True, exist_ok=True)
62
68
  for filename in ["context.json", "core_memory.json", "dialog_history.json", "init_memory.json"]:
63
69
  copy_resource('neuro_simulator', f'agent/memory/{filename}', agent_memory_dir / filename)
@@ -2,6 +2,9 @@
2
2
  import asyncio
3
3
  import logging
4
4
 
5
+ from ..services.stream import live_stream_manager
6
+ from .websocket import connection_manager
7
+
5
8
  logger = logging.getLogger(__name__.replace("neuro_simulator", "server", 1))
6
9
 
7
10
  class ProcessManager:
@@ -28,7 +31,6 @@ class ProcessManager:
28
31
 
29
32
  logger.info("Starting core stream processes...")
30
33
  from ..core.application import generate_audience_chat_task, neuro_response_cycle, broadcast_events_task
31
- from ..services.stream import live_stream_manager
32
34
  from ..utils.queue import clear_all_queues
33
35
  from ..core.agent_factory import create_agent
34
36
 
@@ -45,10 +47,14 @@ class ProcessManager:
45
47
  self._is_running = True
46
48
  logger.info(f"Core processes started: {len(self._tasks)} tasks.")
47
49
 
48
- def stop_live_processes(self):
50
+ async def stop_live_processes(self):
49
51
  """Stops and cleans up all running background tasks."""
50
52
  if not self.is_running:
51
53
  return
54
+
55
+ logger.info("Broadcasting offline message before stopping tasks...")
56
+ await connection_manager.broadcast({"type": "offline"})
57
+ await asyncio.sleep(0.1) # Give a brief moment for the message to be sent
52
58
 
53
59
  logger.info(f"Stopping {len(self._tasks)} core tasks...")
54
60
  for task in self._tasks:
@@ -58,7 +64,6 @@ class ProcessManager:
58
64
  self._tasks.clear()
59
65
  self._is_running = False
60
66
 
61
- from ..services.stream import live_stream_manager
62
67
  live_stream_manager.reset_stream_state()
63
68
 
64
69
  logger.info("All core tasks have been stopped.")
@@ -1,176 +1,226 @@
1
- Metadata-Version: 2.4
2
- Name: neuro_simulator
3
- Version: 0.2.0
4
- Summary: Neuro Simulator Server
5
- Author-email: Moha-Master <hongkongreporter@outlook.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/Moha-Master/neuro-simulator
8
- Project-URL: Repository, https://github.com/Moha-Master/neuro-simulator
9
- Project-URL: Issues, https://github.com/Moha-Master/neuro-simulator/issues
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: Operating System :: OS Independent
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Requires-Python: >=3.8
20
- Description-Content-Type: text/markdown
21
- Requires-Dist: fastapi
22
- Requires-Dist: uvicorn
23
- Requires-Dist: google-genai
24
- Requires-Dist: azure-cognitiveservices-speech
25
- Requires-Dist: letta-client
26
- Requires-Dist: openai
27
- Requires-Dist: pyyaml
28
- Requires-Dist: pydantic
29
- Requires-Dist: jinja2
30
- Requires-Dist: python-multipart
31
- Requires-Dist: mutagen
32
- Provides-Extra: dev
33
- Requires-Dist: pytest>=6.0; extra == "dev"
34
- Requires-Dist: pytest-cov; extra == "dev"
35
- Requires-Dist: black; extra == "dev"
36
- Requires-Dist: flake8; extra == "dev"
37
-
38
- # Neuro-Simulator 服务端
39
-
40
- *本临时README由AI自动生成*
41
-
42
- 这是 Neuro Simulator 的服务端,负责处理直播逻辑、AI 交互、TTS 合成等核心功能。
43
-
44
- ## 功能特性
45
-
46
- - **动态观众**:调用无状态LLM,动态生成观众聊天内容,支持 Gemini 和 OpenAI API
47
- - **配置管理**:支持通过 API 动态修改和热重载配置
48
- - **外部控制**:完全使用外部API端点操控服务端运行
49
-
50
- ## 目录结构
51
-
52
- ``` main
53
- neuro_simulator/
54
- ├── main.py # 应用入口和核心逻辑
55
- ├── config.py # 配置管理模块
56
- ├── letta.py # Letta Agent 集成
57
- ├── chatbot.py # 观众聊天生成器
58
- ├── audio_synthesis.py # 音频合成模块
59
- ├── stream_chat.py # 聊天消息处理
60
- ├── stream_manager.py # 直播管理器
61
- ├── websocket_manager.py # WebSocket 连接管理
62
- ├── process_manager.py # 进程管理器
63
- ├── shared_state.py # 全局状态管理
64
- ├── log_handler.py # 日志处理模块
65
- ├── requirements.txt # Python 依赖列表
66
- ├── pyproject.toml # Python 包安装配置
67
- ├── cli.py # 命令行启动脚本
68
- ├── config.yaml.example # 自带的备用配置模板
69
- └── media/ # 自带的备用媒体文件
70
- └── neuro_start.mp4 # 用来计算Start Soon长度,仅读取时长
71
- ```
72
-
73
- ``` workin'dir
74
- working_dir_example/ # 工作目录结构,请将这个目录重命名和复制到你想要的位置(推荐放到~/.config/neuro-simulator)
75
- ├── media/ # 媒体文件夹,如缺失会使用自带资源覆盖
76
- │ └── neuro_start.mp4 # 用来计算Start Soon长度,仅读取时长,请和客户端的视频保持一致
77
- ├── config.yaml # 由用户手工创建的配置文件
78
- └── config.yaml.example # 自动生成的配置文件模板,必须手动重命名和填写
79
- ```
80
-
81
- ## 安装与配置
82
-
83
- 0. **在运行server前,必须有已经配置完成的Letta Agent。**
84
- 1. 复制一份 `../docs/working_dir_example` 到你想要的位置,作为配置文件目录.
85
- - 程序会在未指定 `--dir` 的情况下自动生成一个工作目录,路径为 `~/.config/neuro-simulator/`
86
- 2. 然后进入配置文件目录,复制 `config.yaml.example` 到 `config.yaml`
87
- 3. 编辑 `config.yaml` 文件,填入必要的 API 密钥和配置项:
88
- - Letta Token 和 Agent ID
89
- - Gemini/OpenAI API Key
90
- - Azure TTS Key 和 Region
91
-
92
- 可以执行替换media/neuro_start.mp4为其它视频文件,但记得手动替换client中的同名文件。
93
-
94
- ### 直接安装方式(无需二次开发)
95
-
96
- 若无需二次开发,可以直接使用pip安装:
97
- ```bash
98
- python3 -m venv venv
99
- # Windows
100
- venv/Scripts/pip install neuro-simulator
101
- # macOS/Linux
102
- venv/bin/pip install neuro-simulator
103
- ```
104
-
105
- ### 二次开发方式
106
-
107
- 若需要二次开发,请克隆项目,在server下建立venv,然后pip install -e ./:
108
- ```bash
109
- git clone https://github.com/your-username/Neuro-Simulator.git
110
- cd Neuro-Simulator/server
111
- python3 -m venv venv
112
- # Windows
113
- venv/Scripts/pip install -e .
114
- # macOS/Linux
115
- venv/bin/pip install -e .
116
- ```
117
-
118
- ### 运行服务
119
-
120
- ```bash
121
- # 使用默认配置 (位于~/.config/neuro-simulator/)
122
- neuro
123
-
124
- # 指定工作目录
125
- neuro -D /path/to/your/config
126
-
127
- # 指定主机和端口
128
- neuro -H 0.0.0.0 -P 8080
129
-
130
- # 组合使用
131
- neuro -D /path/to/your/config -H 0.0.0.0 -P 8080
132
- ```
133
-
134
- 服务默认运行在 `http://127.0.0.1:8000`。
135
-
136
- ## API 接口
137
-
138
- 后端提供丰富的 API 接口用于控制和管理:
139
-
140
- - `/api/stream/*` - 直播控制接口(启动/停止/重启/状态)
141
- - `/api/configs/*` - 配置管理接口(获取/更新/重载配置)
142
- - `api_keys` `server` 等敏感配置项无法从接口获取和修改。
143
- - `/api/logs` - 日志获取接口
144
- - `/api/tts/synthesize` - TTS 合成接口
145
- - `/api/system/health` - 健康检查接口
146
- - `/ws/stream` - 直播内容 WebSocket 接口
147
- - `/ws/logs` - 日志流 WebSocket 接口
148
-
149
- 详细接口说明可通过 `http://127.0.0.1:8000/docs` 访问 API 文档查看。
150
-
151
- ## 配置说明
152
-
153
- 配置文件 `config.yaml` 包含以下主要配置项:
154
-
155
- - `api_keys` - 各种服务的 API 密钥
156
- - `stream_metadata` - 直播元数据(标题、分类、标签等)
157
- - `neuro_behavior` - Neuro 行为设置
158
- - `audience_simulation` - 观众模拟设置
159
- - `tts` - TTS 语音合成设置
160
- - `performance` - 性能相关设置
161
- - `server` - 服务器设置(主机、端口、CORS 等)
162
-
163
- 有关配置文件的完整示例,请参阅项目根目录下的 `docs/working_dir_example/` 文件夹。
164
-
165
- ## 安全说明
166
-
167
- 1. 通过 `panel_password` 配置项可以设置控制面板访问密码
168
- 2. 敏感配置项(如 API 密钥)不会通过 API 接口暴露
169
- 3. 支持 CORS,仅允许预配置的来源访问
170
-
171
- ## 故障排除
172
-
173
- - 确保所有必需的 API 密钥都已正确配置
174
- - 检查网络连接是否正常
175
- - 查看日志文件获取错误信息
176
- - 确保端口未被其他程序占用
1
+ Metadata-Version: 2.4
2
+ Name: neuro_simulator
3
+ Version: 0.2.2
4
+ Summary: Neuro Simulator Server
5
+ Author-email: Moha-Master <hongkongreporter@outlook.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Moha-Master/neuro-simulator
8
+ Project-URL: Repository, https://github.com/Moha-Master/neuro-simulator
9
+ Project-URL: Issues, https://github.com/Moha-Master/neuro-simulator/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: fastapi
22
+ Requires-Dist: uvicorn
23
+ Requires-Dist: google-genai
24
+ Requires-Dist: azure-cognitiveservices-speech
25
+ Requires-Dist: letta-client
26
+ Requires-Dist: openai
27
+ Requires-Dist: pyyaml
28
+ Requires-Dist: pydantic
29
+ Requires-Dist: jinja2
30
+ Requires-Dist: python-multipart
31
+ Requires-Dist: mutagen
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=6.0; extra == "dev"
34
+ Requires-Dist: pytest-cov; extra == "dev"
35
+ Requires-Dist: black; extra == "dev"
36
+ Requires-Dist: flake8; extra == "dev"
37
+
38
+ # Neuro-Simulator 服务端
39
+
40
+ *本临时README由AI自动生成*
41
+
42
+ 这是 Neuro Simulator 的服务端,负责处理直播逻辑、AI 交互、TTS 合成等核心功能
43
+
44
+ ## 功能特性
45
+
46
+ - **动态观众**:调用无状态LLM,动态生成观众聊天内容,支持 Gemini 和 OpenAI API
47
+ - **配置管理**:支持通过 API 动态修改和热重载配置
48
+ - **外部控制**:完全使用外部API端点操控服务端运行
49
+
50
+ ## 目录结构
51
+
52
+ ``` main
53
+ neuro_simulator/
54
+ ├── __init__.py
55
+ ├── cli.py # 命令行启动脚本
56
+ ├── core/ # 核心模块
57
+ ├── __init__.py
58
+ ├── application.py # FastAPI应用和主要路由
59
+ ├── config.py # 配置管理模块
60
+ ├── agent_factory.py # Agent工厂模式实现
61
+ ├── agent_interface.py # Agent接口定义
62
+ │ └── config.yaml.example # 自带的备用配置模板
63
+ ├── agent/ # 内建Agent模块
64
+ ├── __init__.py
65
+ ├── base.py # Agent基类
66
+ ├── core.py # Agent核心实现
67
+ ├── factory.py # Agent工厂
68
+ ├── llm.py # LLM客户端
69
+ │ ├── memory/ # 记忆管理模块
70
+ │ │ ├── __init__.py
71
+ │ │ ├── manager.py # 记忆管理器
72
+ │ │ ├── context.json # 上下文记忆文件
73
+ │ │ ├── core_memory.json # 核心记忆文件
74
+ │ │ ├── init_memory.json # 初始化记忆文件
75
+ │ │ └── temp_memory.json # 临时记忆文件
76
+ │ └── tools/ # 工具模块
77
+ ├── __init__.py
78
+ └── core.py # 核心工具实现
79
+ ├── api/ # API路由模块
80
+ │ ├── __init__.py
81
+ │ ├── agent.py # Agent管理API
82
+ │ ├── stream.py # 直播控制API
83
+ │ └── system.py # 系统管理API
84
+ ├── services/ # 服务模块
85
+ ├── __init__.py
86
+ │ ├── audience.py # 观众聊天生成器
87
+ │ ├── audio.py # 音频合成模块
88
+ ├── builtin.py # 内建Agent服务
89
+ ├── letta.py # Letta Agent 集成
90
+ └── stream.py # 直播管理服务
91
+ ├── utils/ # 工具模块
92
+ │ ├── __init__.py
93
+ │ ├── logging.py # 日志处理模块
94
+ │ ├── process.py # 进程管理模块
95
+ │ ├── queue.py # 队列处理模块
96
+ │ ├── state.py # 状态管理模块
97
+ │ └── websocket.py # WebSocket连接管理
98
+ ├── assets/ # 自带的备用媒体文件
99
+ │ └── neuro_start.mp4 # 用来计算Start Soon长度,仅读取时长
100
+ ├── requirements.txt # Python 依赖列表
101
+ └── pyproject.toml # Python 包安装配置
102
+ ```
103
+
104
+ ``` workin'dir
105
+ working_dir_example/ # 工作目录结构,请将这个目录重命名和复制到你想要的位置(推荐放到~/.config/neuro-simulator)
106
+ ├── assets/ # 媒体文件夹,如缺失会使用自带资源覆盖
107
+ │ └── neuro_start.mp4 # 用来计算Start Soon长度,仅读取时长,请和客户端的视频保持一致
108
+ ├── config.yaml # 由用户手工创建的配置文件
109
+ ├── config.yaml.example # 自动生成的配置文件模板,必须手动重命名和填写
110
+ └── agent/ # Agent相关文件夹
111
+ └── memory/ # Agent记忆文件夹
112
+ ├── context.json # 上下文记忆文件
113
+ ├── core_memory.json # 核心记忆文件
114
+ ├── init_memory.json # 初始化记忆文件
115
+ └── temp_memory.json # 临时记忆文件
116
+ ```
117
+
118
+ ## 安装与配置
119
+
120
+ 1. 复制一份 `../docs/working_dir_example` 到你想要的位置,作为配置文件目录.
121
+ - 程序会在未指定 `--dir` 的情况下自动生成一个工作目录,路径为 `~/.config/neuro-simulator/`
122
+ 2. 然后进入配置文件目录,复制 `config.yaml.example` 到 `config.yaml`
123
+ 3. 编辑 `config.yaml` 文件,填入必要的 API 密钥和配置项:
124
+ - 如果使用 Letta Agent,需要配置 Letta Token 和 Agent ID
125
+ - Gemini/OpenAI API Key(用于观众聊天生成和 Agent)
126
+ - Azure TTS Key 和 Region
127
+
128
+ 可以自行替换 `$dir/assets/neuro_start.mp4` 为其它视频文件,但记得手动替换 client 中的同名文件
129
+
130
+ ### Agent配置
131
+
132
+ 服务端支持两种Agent类型:
133
+ 1. **Letta Agent**:需要配置 Letta Cloud 或自托管的 Letta Server
134
+ 2. **内建 Agent**:使用服务端自带的 Agent,支持 Gemini 和OpenAI API
135
+
136
+ `config.yaml` 中通过 `agent_type` 字段选择使用的 Agent 类型:
137
+ - `agent_type: "letta"`:使用 Letta Agent
138
+ - `agent_type: "builtin"`:使用内建 Agent
139
+
140
+ 当使用内建Agent时,还需要配置:
141
+ - `agent.agent_provider`:选择"gemini"或"openai"
142
+ - `agent.agent_model`:指定具体的模型名称
143
+
144
+ ### 直接安装方式(无需二次开发)
145
+
146
+ 若无需二次开发,可以直接使用 pip 安装:
147
+ ```bash
148
+ python3 -m venv venv
149
+ # Windows
150
+ venv/Scripts/pip install neuro-simulator
151
+ # macOS/Linux
152
+ venv/bin/pip install neuro-simulator
153
+ ```
154
+
155
+ ### 二次开发方式
156
+
157
+ 若需要二次开发,请克隆项目:
158
+ ```bash
159
+ git clone https://github.com/your-username/Neuro-Simulator.git
160
+ cd Neuro-Simulator/server
161
+ python3 -m venv venv
162
+ # Windows
163
+ venv/Scripts/pip install -e .
164
+ # macOS/Linux
165
+ venv/bin/pip install -e .
166
+ ```
167
+
168
+ ### 运行服务
169
+
170
+ ```bash
171
+ # 使用默认配置 (位于~/.config/neuro-simulator/)
172
+ neuro
173
+
174
+ # 指定工作目录
175
+ neuro -D /path/to/your/config
176
+
177
+ # 指定主机和端口
178
+ neuro -H 0.0.0.0 -P 8080
179
+
180
+ # 组合使用
181
+ neuro -D /path/to/your/config -H 0.0.0.0 -P 8080
182
+ ```
183
+
184
+ 服务默认运行在 `http://127.0.0.1:8000`
185
+
186
+ ## API 接口
187
+
188
+ 后端提供丰富的 API 接口用于控制和管理:
189
+
190
+ - `/api/stream/*` - 直播控制接口(启动/停止/重启/状态)
191
+ - `/api/configs/*` - 配置管理接口(获取/更新/重载配置)
192
+ - `api_keys` `server` 等敏感配置项无法从接口获取和修改
193
+ - `/api/logs` - 日志获取接口
194
+ - `/api/tts/synthesize` - TTS 合成接口
195
+ - `/api/system/health` - 健康检查接口
196
+ - `/ws/stream` - 客户端使用的直播接口
197
+ - `/ws/admin` - 日志和内建 Agent的 Context 流接口
198
+
199
+ 详细接口说明可通过 `http://127.0.0.1:8000/docs` 访问 API 文档查
200
+
201
+ ## 配置说明
202
+
203
+ 配置文件 `config.yaml` 包含以下主要配置项:
204
+
205
+ - `api_keys` - 各种服务的 API 密钥
206
+ - `stream_metadata` - 直播元数据(标题、分类、标签等)
207
+ - `neuro_behavior` - Neuro 行为设置
208
+ - `audience_simulation` - 观众模拟设置
209
+ - `tts` - TTS 语音合成设置
210
+ - `performance` - 性能相关设置
211
+ - `server` - 服务器设置(主机、端口、CORS 等)
212
+
213
+ 有关配置文件的完整示例,请参阅项目根目录下的 `docs/working_dir_example/` 文件夹
214
+
215
+ ## 安全说明
216
+
217
+ 1. 通过 `panel_password` 配置项可以设置控制面板访问密码
218
+ 2. 敏感配置项(如 API 密钥)不会通过 API 接口暴露
219
+ 3. 支持 CORS,仅允许预配置的来源访问
220
+
221
+ ## 故障排除
222
+
223
+ - 确保所有必需的 API 密钥都已正确配置
224
+ - 检查网络连接是否正常
225
+ - 查看日志文件获取错误信息
226
+ - 确保端口未被其他程序占用
@@ -1,8 +1,8 @@
1
1
  neuro_simulator/__init__.py,sha256=-tposzyvg6UckPcfSvtc03UjxBa9oCe_zRvlKf8splk,31
2
- neuro_simulator/cli.py,sha256=nf69ABiVSLsOSVU0uL-bfxHN_N4kStb8kmCSetF1ffY,3606
2
+ neuro_simulator/cli.py,sha256=p2jSNbMsQ2HYau-EX3ygmTRhECU9dbSg0v53xgYjOZ4,3894
3
3
  neuro_simulator/agent/__init__.py,sha256=t52CZlyTGWqcGjMs90qvpFpRckY2WSSlO7r_H3K_mSY,32
4
4
  neuro_simulator/agent/base.py,sha256=6v2ZO5UpGCwJEkJ23Oe96Rs510tK4ZOEpZ2DB49IZmM,1262
5
- neuro_simulator/agent/core.py,sha256=WbIOU15LK9YKVeY0Osp9PJEzs0NXfgCp-aj9t9daVHc,9265
5
+ neuro_simulator/agent/core.py,sha256=CJv0We7ZjW_EKQB54Xq-y3wDu2a2HmoaOAdYR057HOg,8941
6
6
  neuro_simulator/agent/factory.py,sha256=e0IBnqJQM7OuKtglrf-pWwqwmg98wh7tOq5LxF2rV-w,1146
7
7
  neuro_simulator/agent/llm.py,sha256=vLz8hp2h2R0JaNfS1RLGYGkri_YoUdlEdNfFVbxeEuI,4261
8
8
  neuro_simulator/agent/memory/__init__.py,sha256=YJ7cynQJI6kD7vjyv3rKc-CZqmoYSuGQtRZl_XdGEps,39
@@ -11,7 +11,7 @@ neuro_simulator/agent/tools/__init__.py,sha256=1WZy6PADfi6o1avyy1y-ThWBFAPJ_bBqt
11
11
  neuro_simulator/agent/tools/core.py,sha256=o6Oyis-HFD-g6Z_u3T--tkmr9ylKJvybKqMRSMUwi1Q,5555
12
12
  neuro_simulator/api/__init__.py,sha256=5LWyDSayPGdQS8Rv13nmAKLyhPnMVPyTYDdvoMPB4xw,56
13
13
  neuro_simulator/api/agent.py,sha256=ABl_JoIxB4wW_J2J52bWndmTXkfGJBS5LZmbGuh7zv8,6343
14
- neuro_simulator/api/stream.py,sha256=Pg793dXLnJ0oydrIwWFgWD0cVdFAx_QOw6L5LjE0uIo,2069
14
+ neuro_simulator/api/stream.py,sha256=Yg-cwjVI2HTLAt7moWbDQ1ZbbP6QE1ZB8LrW6A3tcQk,2081
15
15
  neuro_simulator/api/system.py,sha256=hXznMcThuFhwopYWgpzrRxwtBuFnF_b_vinkOaE5XOs,3712
16
16
  neuro_simulator/core/__init__.py,sha256=-ojq25c8XA0CU25b0OxcGjH4IWFEDHR-HXSRSZIuKe8,57
17
17
  neuro_simulator/core/agent_factory.py,sha256=qMFidwT5IrOkyNHwmpO8_fRv20KLbaIBfWF-VTFCLNA,1742
@@ -26,12 +26,12 @@ neuro_simulator/services/letta.py,sha256=iXyzFyPVty3SjYCHOJAF1QqhUFmxTQbqk8lYJOw
26
26
  neuro_simulator/services/stream.py,sha256=dG7RuNI_ICohPkqKZ-zlBppo54BgWm_KYBs-ezzc73E,5907
27
27
  neuro_simulator/utils/__init__.py,sha256=xSEFzjT827W81mNyQ_DLtr00TgFlttqfFgpz9pSxFXQ,58
28
28
  neuro_simulator/utils/logging.py,sha256=BO-q_cCcoeamsc8eJqq2-L3Z8nhApze_v6LnmD-O8Ww,3411
29
- neuro_simulator/utils/process.py,sha256=FmwIuOsp19jJBEbAj-WeUpdUsQN7B9_J1rlU0Q1TXuo,2388
29
+ neuro_simulator/utils/process.py,sha256=9w2JQH59Wy6L8ADrig2QF88iajdykGPZIYJVJe6Al2Y,2603
30
30
  neuro_simulator/utils/queue.py,sha256=7SSnUnrqxHkqSeYVjp1S5kpr8qlo4IVdU2NsGwFQAVw,1546
31
31
  neuro_simulator/utils/state.py,sha256=E1ilecgMTOAhiw_kNvLG0akkhdZKhzKLrA3oB4NNVTA,538
32
32
  neuro_simulator/utils/websocket.py,sha256=yOdFvJzbNhcUn5EAuyS55G_R8q-snas5OvkOtS8g19E,2292
33
- neuro_simulator-0.2.0.dist-info/METADATA,sha256=keF5r6S8qz28e89k3fxpaDh5iUOGZlSOh_WtZevaDfU,6542
34
- neuro_simulator-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
- neuro_simulator-0.2.0.dist-info/entry_points.txt,sha256=qVd5ypnRRgU8Cw7rWfZ7o0OXyS9P9hgY-cRoN_mgz9g,51
36
- neuro_simulator-0.2.0.dist-info/top_level.txt,sha256=V8awSKpcrFnjJDiJxSfy7jtOrnuE2BgAR9hLmfMDWK8,16
37
- neuro_simulator-0.2.0.dist-info/RECORD,,
33
+ neuro_simulator-0.2.2.dist-info/METADATA,sha256=lBjb1G0VhfbDCQhRWQOxJzlt9Ut07XL6zApn6X6G_jo,8676
34
+ neuro_simulator-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
+ neuro_simulator-0.2.2.dist-info/entry_points.txt,sha256=qVd5ypnRRgU8Cw7rWfZ7o0OXyS9P9hgY-cRoN_mgz9g,51
36
+ neuro_simulator-0.2.2.dist-info/top_level.txt,sha256=V8awSKpcrFnjJDiJxSfy7jtOrnuE2BgAR9hLmfMDWK8,16
37
+ neuro_simulator-0.2.2.dist-info/RECORD,,