Skip to content

Commit f5f79b2

Browse files
committed
prettier and fix char files
1 parent 6a0cb86 commit f5f79b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2026
-1583
lines changed

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727

2828
- name: Create test env file
2929
run: |
30-
echo "TEST_DATABASE_CLIENT=sqlite" > core/.env.test
31-
echo "NODE_ENV=test" >> core/.env.test
30+
echo "TEST_DATABASE_CLIENT=sqlite" > core/.env.test
31+
echo "NODE_ENV=test" >> core/.env.test
3232
3333
- name: Run tests
3434
run: cd core && pnpm test
+27-27
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
name: Generate Changelog
22
on:
3-
push:
4-
tags:
5-
- '*'
3+
push:
4+
tags:
5+
- "*"
66
jobs:
7-
changelog:
8-
runs-on: ubuntu-latest
9-
permissions:
10-
contents: write
11-
steps:
12-
- uses: actions/checkout@v4
13-
with:
14-
ref: main
15-
token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
16-
- name: Generate Changelog
17-
run: |
18-
export PATH="$PATH:/home/runner/.local/share/gem/ruby/3.0.0/bin"
19-
gem install --user-install github_changelog_generator
20-
github_changelog_generator \
21-
-u ${{ github.repository_owner }} \
22-
-p ${{ github.event.repository.name }} \
23-
--token ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
24-
- name: Commit Changelog
25-
uses: stefanzweifel/git-auto-commit-action@v5
26-
with:
27-
commit_message: "chore: update changelog"
28-
branch: main
29-
file_pattern: "CHANGELOG.md"
30-
commit_author: "GitHub Action <actions@github.com>"
7+
changelog:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
ref: main
15+
token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
16+
- name: Generate Changelog
17+
run: |
18+
export PATH="$PATH:/home/runner/.local/share/gem/ruby/3.0.0/bin"
19+
gem install --user-install github_changelog_generator
20+
github_changelog_generator \
21+
-u ${{ github.repository_owner }} \
22+
-p ${{ github.event.repository.name }} \
23+
--token ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
24+
- name: Commit Changelog
25+
uses: stefanzweifel/git-auto-commit-action@v5
26+
with:
27+
commit_message: "chore: update changelog"
28+
branch: main
29+
file_pattern: "CHANGELOG.md"
30+
commit_author: "GitHub Action <actions@github.com>"

README.md

+19-16
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@
66

77
## Features
88

9-
- 🛠 Full-featured Discord, Twitter and Telegram connectors
10-
- 👥 Multi-agent and room support
11-
- 📚 Easily ingest and interact with your documents
12-
- 💾 Retrievable memory and document store
13-
- 🚀 Highly extensible - create your own actions and clients to extend capabilities
14-
- ☁️ Supports many models, including local Llama, OpenAI, Anthropic, Groq, and more
15-
- 📦 Just works!
9+
- 🛠 Full-featured Discord, Twitter and Telegram connectors
10+
- 👥 Multi-agent and room support
11+
- 📚 Easily ingest and interact with your documents
12+
- 💾 Retrievable memory and document store
13+
- 🚀 Highly extensible - create your own actions and clients to extend capabilities
14+
- ☁️ Supports many models, including local Llama, OpenAI, Anthropic, Groq, and more
15+
- 📦 Just works!
1616

1717
## What can I use it for?
18-
- 🤖 Chatbots
19-
- 🕵️ Autonomous Agents
20-
- 📈 Business process handling
21-
- 🎮 Video game NPCs
18+
19+
- 🤖 Chatbots
20+
- 🕵️ Autonomous Agents
21+
- 📈 Business process handling
22+
- 🎮 Video game NPCs
2223

2324
# Getting Started
2425

@@ -161,15 +162,17 @@ pnpm test:watch # Run tests in watch mode
161162
```
162163

163164
For database-specific tests:
165+
164166
```bash
165167
pnpm test:sqlite # Run tests with SQLite
166168
pnpm test:sqljs # Run tests with SQL.js
167169
```
168170

169171
Tests are written using Jest and can be found in `src/**/*.test.ts` files. The test environment is configured to:
170-
- Load environment variables from `.env.test`
171-
- Use a 2-minute timeout for long-running tests
172-
- Support ESM modules
173-
- Run tests in sequence (--runInBand)
174172

175-
To create new tests, add a `.test.ts` file adjacent to the code you're testing.
173+
- Load environment variables from `.env.test`
174+
- Use a 2-minute timeout for long-running tests
175+
- Support ESM modules
176+
- Run tests in sequence (--runInBand)
177+
178+
To create new tests, add a `.test.ts` file adjacent to the code you're testing.

README_CN.md

+23-21
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
## 功能
66

7-
- 🛠 支持discord/推特/telegram连接
8-
- 👥 支持多模态agent
9-
- 📚 简单的导入文档并与文档交互
10-
- 💾 可检索的内存和文档存储
11-
- 🚀 高可拓展性,你可以自定义客户端和行为来进行功能拓展
12-
- ☁️ 多模型支持,包括Llama、OpenAI、Grok、Anthropic等
13-
- 📦 简单好用
14-
7+
- 🛠 支持discord/推特/telegram连接
8+
- 👥 支持多模态agent
9+
- 📚 简单的导入文档并与文档交互
10+
- 💾 可检索的内存和文档存储
11+
- 🚀 高可拓展性,你可以自定义客户端和行为来进行功能拓展
12+
- ☁️ 多模型支持,包括Llama、OpenAI、Grok、Anthropic等
13+
- 📦 简单好用
1514

1615
你可以用Eliza做什么?
17-
- 🤖 聊天机器人
18-
- 🕵️ 自主Agents
19-
- 📈 业务流程自动化处理
20-
- 🎮 游戏NPC
16+
17+
- 🤖 聊天机器人
18+
- 🕵️ 自主Agents
19+
- 📈 业务流程自动化处理
20+
- 🎮 游戏NPC
2121

2222
# 开始使用
2323

@@ -30,7 +30,7 @@
3030

3131
### 编辑.env文件
3232

33-
- - 将 .env.example 复制为 .env 并填写适当的值
33+
- - 将 .env.example 复制为 .env 并填写适当的值
3434
- 编辑推特环境并输入你的推特账号和密码
3535

3636
### 编辑角色文件
@@ -39,6 +39,7 @@
3939
- 您也可以使用 `node --loader ts-node/esm src/index.ts --characters="path/to/your/character.json"` 加载角色并同时运行多个机器人。
4040

4141
在完成账号和角色文件的配置后,输入以下命令行启动你的bot:
42+
4243
```
4344
pnpm i
4445
pnpm start
@@ -53,13 +54,13 @@ pnpm start
5354
## 配置不同的大模型
5455

5556
### 配置Llama
57+
5658
您可以通过设置 `XAI_MODEL` 环境变量为 `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo``meta-llama/Meta-Llama-3.1-405B-Instruct` 来运行 Llama 70B 或 405B 模型
5759

5860
### 配置OpenAI
5961

6062
您可以通过设置 `XAI_MODEL` 环境变量为 `gpt-4o-mini``gpt-4o` 来运行 OpenAI 模型
6163

62-
6364
## 其他要求
6465

6566
您可能需要安装 Sharp。如果在启动时看到错误,请尝试使用以下命令安装:
@@ -135,10 +136,9 @@ npx --no node-llama-cpp source download --gpu cuda
135136

136137
### 本地运行
137138

138-
添加 XAI_MODEL 并将其设置为上述 [使用 Llama 运行](#run-with-llama) 中的选项之一
139+
添加 XAI_MODEL 并将其设置为上述 [使用 Llama 运行](#run-with-llama) 中的选项之一
139140
您可以将 X_SERVER_URL 和 XAI_API_KEY 留空,它会从 huggingface 下载模型并在本地查询
140141

141-
142142
# 客户端
143143

144144
关于怎么设置discord bot,可以查看discord的官方文档
@@ -155,15 +155,17 @@ pnpm test:watch # Run tests in watch mode
155155
```
156156

157157
对于数据库特定的测试:
158+
158159
```bash
159160
pnpm test:sqlite # Run tests with SQLite
160161
pnpm test:sqljs # Run tests with SQL.js
161162
```
162163

163-
测试使用 Jest 编写,位于 src/**/*.test.ts 文件中。测试环境配置如下:
164-
- 从 .env.test 加载环境变量
165-
- 使用 2 分钟的超时时间来运行长时间运行的测试
166-
- 支持 ESM 模块
167-
- 按顺序运行测试 (--runInBand)
164+
测试使用 Jest 编写,位于 src/\*_/_.test.ts 文件中。测试环境配置如下:
165+
166+
- 从 .env.test 加载环境变量
167+
- 使用 2 分钟的超时时间来运行长时间运行的测试
168+
- 支持 ESM 模块
169+
- 按顺序运行测试 (--runInBand)
168170

169171
要创建新测试,请在要测试的代码旁边添加一个 .test.ts 文件。

characters/tate.character.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
{
22
"name": "tate",
33
"clients": ["discord", "twitter", "telegram"],
4+
"modelProvider": "anthropic",
45
"settings": {
56
"secrets": {},
67
"voice": {
78
"model": "en_US-male-medium"
89
}
910
},
1011
"bio": [
11-
""
12+
"Andrew Tate is a former kickboxer, entrepreneur, and self-proclaimed misogynist.",
13+
"He is a strong advocate for masculinity and believes in the importance of strength and dominance in relationships.",
14+
"He is a self-proclaimed misogynist and believes that women should be submissive to men.",
15+
"People call him the 'King of Men' and he believes that he is the best at everything he does."
1216
],
1317
"lore": [
14-
""
15-
],
16-
"knowledge": [
17-
""
18+
"Andrew once was a kickboxer, but now he's a self-proclaimed misogynist entrepreneur.",
19+
"He is a strong advocate for masculinity and believes in the importance of strength and dominance in relationships.",
20+
"He is a self-proclaimed misogynist and believes that women should be submissive to men.",
21+
"People call him the 'King of Men' and he believes that he is the best at everything he does."
1822
],
23+
"knowledge": [],
1924
"messageExamples": [
2025
[
2126
{

characters/trump.character.json

+2-46
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "trump",
3-
"clients": ["discord", "twitter", "telegram"],
3+
"clients": [],
44
"settings": {
55
"secrets": {},
66
"voice": {
@@ -345,49 +345,5 @@
345345
"CRIMINAL",
346346
"INTERFERING",
347347
"DESPERATE"
348-
],
349-
"nicknames": {
350-
"opponents": [
351-
"Lyin' Kamala",
352-
"Comrade Kamala",
353-
"Crooked Joe",
354-
"Tampon Tim",
355-
"Border Czar Kamala",
356-
"Tax Queen Kamala",
357-
"Sleepy Joe"
358-
],
359-
"allies": [
360-
"Brave Patriots",
361-
"Smart JD",
362-
"America First Republicans",
363-
"MAGA Warriors",
364-
"True Americans",
365-
"Great Veterans",
366-
"Strong Christians"
367-
]
368-
},
369-
"phrases": {
370-
"promises": [
371-
"DAY ONE we will",
372-
"I WILL STOP IT",
373-
"We will rebuild",
374-
"We will emerge stronger",
375-
"We will save our Nation",
376-
"MAKING AMERICA GREAT AGAIN"
377-
],
378-
"warnings": [
379-
"DESTROY OUR DEMOCRACY",
380-
"Your family finances will be permanently destroyed",
381-
"Your borders will be gone forever",
382-
"DANGER to our Kids",
383-
"They want America LAST"
384-
],
385-
"victories": [
386-
"BUT THEY WILL FAIL",
387-
"We are WINNING",
388-
"TOO STRONG to stop",
389-
"MASSIVE crowds",
390-
"HISTORIC support"
391-
]
392-
}
348+
]
393349
}

core/jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ export default {
2323
"^(\\.{1,2}/.*)\\.js$": "$1",
2424
},
2525
extensionsToTreatAsEsm: [".ts"],
26-
}
26+
};

core/src/actions/continue.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ export const continueAction: Action = {
132132

133133
const context = composeContext({
134134
state,
135-
template: runtime.character.templates?.continueMessageHandlerTemplate || runtime.character.templates?.messageHandlerTemplate || messageHandlerTemplate,
135+
template:
136+
runtime.character.templates?.continueMessageHandlerTemplate ||
137+
runtime.character.templates?.messageHandlerTemplate ||
138+
messageHandlerTemplate,
136139
});
137140
const datestr = new Date().toUTCString().replace(/:/g, "-");
138141

0 commit comments

Comments
 (0)