Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 46e34be
Merge: 4e27c73 6045011
Author: Odilitime <janesmith@airmail.cc>
Date:   Wed Dec 18 09:29:44 2024 -0800

    Merge pull request elizaOS#1196 from tomguluson92/patch-1

    docs: Update "CN README" with more details

commit 6045011
Merge: a4f4123 4e27c73
Author: Odilitime <janesmith@airmail.cc>
Date:   Wed Dec 18 09:29:22 2024 -0800

    Merge branch 'develop' into patch-1

commit a4f4123
Author: Odilitime <janesmith@airmail.cc>
Date:   Wed Dec 18 09:24:52 2024 -0800

    add missing change directories

commit 28b46af
Author: tomguluson92 <314913739@qq.com>
Date:   Wed Dec 18 14:09:56 2024 +0800

    Update README_CN.md

    Add more details in the CN version of README
AbdelStark committed Dec 18, 2024
1 parent 015ed25 commit e9e3751
Showing 1 changed file with 58 additions and 6 deletions.
64 changes: 58 additions & 6 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -21,29 +21,81 @@

# 开始使用

**前置要求(必须):**
**前置要求(必须):**

- [Python 2.7+](https://www.python.org/downloads/)
- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [pnpm](https://pnpm.io/installation)

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

- 将 .env.example 复制为 .env 并填写适当的值
## (A) 使用启动器(Starter): 推荐

```
git clone https://github.com/ai16z/eliza-starter.git
cd eliza-starter
cp .env.example .env
```

## (B) 手动启动Eliza: 仅在您知道自己在做什么时才推荐

```
git clone https://github.com/ai16z/eliza.git
cd eliza
# 切换最新发布的版本(Checkout the latest release)
# Eliza的迭代速度非常快, 所以我们建议经常性的切换到最新的发布版本以免出现问题(This project iterates fast, so we recommend checking out the latest release)
git checkout $(git describe --tags --abbrev=0)
```

在将代码下载到本地后, 我们要做两件事:

### 1. 编辑.env文件(环境变量)

-`.env.example` 复制为 `.env` 并在其中填写适当的值
- 编辑推特环境并输入你的推特账号和密码

### 编辑角色文件
**最简化配置方案**:
```
OPENAI_API_KEY=sk-xxx # 配置OpenAI 的API, sk-开头, 注意, 目前不支持AzureOpenAI!
- 查看文件 `src/core/defaultCharacter.ts` - 您可以修改它
## 如配置Twitter/X, 则需配置
# Twitter/X Configuration
TWITTER_DRY_RUN=false
TWITTER_USERNAME=abc # Your Twitter/X account username
TWITTER_PASSWORD=abc # Your Twitter/X account password
TWITTER_EMAIL= xxx@gmail.com # Your Twitter/X account email
TWITTER_COOKIES= '' # Your Twitter/X cookies, copy from broswer
TWITTER_2FA_SECRET= # Two-factor authentication
```

### 2. 编辑角色文件

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

```
{
"name": "trump",
"clients": ["twitter"],
"modelProvider": "openai",
```

在完成账号和角色文件的配置后,输入以下命令行启动你的bot:
在完成环境变量和角色文件的配置后,输入以下命令行启动你的bot:

```
(A) 使用启动器(Starter)
sh scripts/start.sh
(B) 手动启动Eliza
pnpm i
pnpm build
pnpm start
```


# 自定义Eliza

### 添加常规行为

0 comments on commit e9e3751

Please sign in to comment.