docs: 更新文档并修正打包脚本

- 新增 docs/api.md 后端API文档

- 修正文档中启动流程示例

- 移除不存在的F4快捷键

- 前端直接工具调用不受次数限制

- 打包脚本添加 config_service hidden-import

- Linux脚本添加python3检查
This commit is contained in:
JianFeeeee
2026-04-13 08:36:41 +08:00
parent 1a96a21b0a
commit 7d723b9bd6
9 changed files with 501 additions and 24 deletions

View File

@ -100,17 +100,22 @@ TrulyMEM-TrueHumanMEM/
### 启动流程
```python
# 1. 创建后端
server = BackendServer(db_path="graph_memory.db")
server.start(api_key="your-key")
# 1. 加载配置
from ui.services.config_service import ConfigService
config_service = ConfigService(config_file="config.json")
config = config_service.get_config()
# 2. 创建UI(可选,后端可独立使用)
app = GraphMemoryApp(backend_server=server)
# 2. 创建后端
server = BackendServer(db_path="graph_memory.db", use_embedded_db=True)
server.start(api_key=config.api_key, base_url=config.base_url)
# 3. 创建UI(可选,后端可独立使用)
app = GraphMemoryApp(backend_server=server, config_service=config_service)
app.run()
# 或直接使用后端
client = BackendClient(server)
result = client.send_message("hello")
result = client.process_message("hello")
```
---