Skip to content

Commit 28b46af

Browse files
authored
Update README_CN.md
Add more details in the CN version of README
1 parent 81d0273 commit 28b46af

File tree

1 file changed

+57
-9
lines changed

1 file changed

+57
-9
lines changed

README_CN.md

+57-9
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,78 @@
2121

2222
# 开始使用
2323

24-
**前置要求(必须):**
24+
**前置要求(必须):**
2525

2626
- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
27-
- Nodejs安装
2827
- [pnpm](https://pnpm.io/installation)
29-
- 使用pnpm
3028

31-
### 编辑.env文件
29+
以下是两种基础的Eliza下载方案, 请根据情况自行选择。
3230

33-
- - 将 .env.example 复制为 .env 并填写适当的值
34-
- 编辑推特环境并输入你的推特账号和密码
31+
## (A) 使用启动器(Starter): 推荐
3532

36-
### 编辑角色文件
33+
```
34+
git clone https://github.com/ai16z/eliza-starter.git
35+
cp .env.example .env
36+
```
37+
38+
## (B) 手动启动Eliza: 仅在您知道自己在做什么时才推荐
39+
40+
```
41+
git clone https://github.com/ai16z/eliza.git
42+
43+
# 切换最新发布的版本(Checkout the latest release)
44+
# Eliza的迭代速度非常快, 所以我们建议经常性的切换到最新的发布版本以免出现问题(This project iterates fast, so we recommend checking out the latest release)
45+
git checkout $(git describe --tags --abbrev=0)
46+
```
47+
48+
在将代码下载到本地后, 我们要做两件事:
49+
50+
### 1. 编辑.env文件(环境变量)
51+
52+
-`.env.example` 复制为 `.env` 并在其中填写适当的值
53+
54+
**最简化配置方案**:
55+
```
56+
OPENAI_API_KEY=sk-xxx # 配置OpenAI 的API, sk-开头, 注意, 目前不支持AzureOpenAI!
57+
58+
## 如配置Twitter/X, 则需配置
59+
# Twitter/X Configuration
60+
TWITTER_DRY_RUN=false
61+
TWITTER_USERNAME=abc # Your Twitter/X account username
62+
TWITTER_PASSWORD=abc # Your Twitter/X account password
63+
TWITTER_EMAIL= xxx@gmail.com # Your Twitter/X account email
64+
TWITTER_COOKIES= '' # Your Twitter/X cookies, copy from broswer
65+
TWITTER_2FA_SECRET= # Two-factor authentication
66+
```
67+
68+
### 2. 编辑角色文件
3769

38-
- 查看文件 `src/core/defaultCharacter.ts` - 您可以修改它
70+
- 标准的角色个性定义在文件 `characters/*.character.json`中, 您可以修改它或者直接使用它。
3971
- 您也可以使用 `node --loader ts-node/esm src/index.ts --characters="path/to/your/character.json"` 加载角色并同时运行多个机器人。
72+
- 需要说明的是, 在`characters/*.character.json`中, `clients字段对应**服务**, 默认可选`"twitter", "discord", "telegram"`等, 如果在`clients`中填入了如"twitter"等内容, 则需要在
73+
上面的`env`配置对应的环境变量。对`discord``telegram`同理。
4074

41-
在完成账号和角色文件的配置后,输入以下命令行启动你的bot:
75+
```
76+
{
77+
"name": "trump",
78+
"clients": ["twitter"],
79+
"modelProvider": "openai",
80+
```
81+
82+
在完成环境变量和角色文件的配置后,输入以下命令行启动你的bot:
4283

4384
```
85+
(A) 使用启动器(Starter)
86+
sh scripts/start.sh
87+
88+
89+
(B) 手动启动Eliza
4490
pnpm i
91+
pnpm build
4592
pnpm start
4693
```
4794

95+
4896
# 自定义Eliza
4997

5098
### 添加常规行为

0 commit comments

Comments
 (0)