docs: 更新文档,修正格式并添加必要的换行符
This commit is contained in:
@@ -30,12 +30,13 @@
|
||||
|
||||
在创建虚拟环境之前,请确保你的电脑上安装了Python 3.9及以上版本。如果没有,可以按以下步骤安装:
|
||||
|
||||
1. 访问Python官网下载页面:https://www.python.org/downloads/release/python-3913/
|
||||
1. 访问Python官网下载页面:<https://www.python.org/downloads/release/python-3913/>
|
||||
2. 下载Windows安装程序 (64-bit): `python-3.9.13-amd64.exe`
|
||||
3. 运行安装程序,并确保勾选"Add Python 3.9 to PATH"选项
|
||||
4. 点击"Install Now"开始安装
|
||||
|
||||
或者使用PowerShell自动下载安装(需要管理员权限):
|
||||
|
||||
```powershell
|
||||
# 下载并安装Python 3.9.13
|
||||
$pythonUrl = "https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe"
|
||||
@@ -46,7 +47,7 @@ Start-Process -Wait -FilePath $pythonInstaller -ArgumentList "/quiet", "InstallA
|
||||
|
||||
### 2️⃣ **创建Python虚拟环境来运行程序**
|
||||
|
||||
你可以选择使用以下两种方法之一来创建Python环境:
|
||||
> 你可以选择使用以下两种方法之一来创建Python环境:
|
||||
|
||||
```bash
|
||||
# ---方法1:使用venv(Python自带)
|
||||
@@ -60,6 +61,7 @@ maimbot\\Scripts\\activate
|
||||
# 安装依赖
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
```bash
|
||||
# ---方法2:使用conda
|
||||
# 创建一个新的conda环境(环境名为maimbot)
|
||||
@@ -74,27 +76,35 @@ pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 2️⃣ **然后你需要启动MongoDB数据库,来存储信息**
|
||||
|
||||
- 安装并启动MongoDB服务
|
||||
- 默认连接本地27017端口
|
||||
|
||||
### 3️⃣ **配置NapCat,让麦麦bot与qq取得联系**
|
||||
|
||||
- 安装并登录NapCat(用你的qq小号)
|
||||
- 添加反向WS:`ws://127.0.0.1:8080/onebot/v11/ws`
|
||||
|
||||
### 4️⃣ **配置文件设置,让麦麦Bot正常工作**
|
||||
|
||||
- 修改环境配置文件:`.env.prod`
|
||||
- 修改机器人配置文件:`bot_config.toml`
|
||||
|
||||
### 5️⃣ **启动麦麦机器人**
|
||||
|
||||
- 打开命令行,cd到对应路径
|
||||
|
||||
```bash
|
||||
nb run
|
||||
```
|
||||
|
||||
- 或者cd到对应路径后
|
||||
|
||||
```bash
|
||||
python bot.py
|
||||
```
|
||||
|
||||
### 6️⃣ **其他组件(可选)**
|
||||
|
||||
- `run_thingking.bat`: 启动可视化推理界面(未完善)
|
||||
- 直接运行 knowledge.py生成知识库
|
||||
|
||||
Reference in New Issue
Block a user