Skip to content

Commit dbbde8a

Browse files
Merge remote-tracking branch 'upstream/develop' into twitter-cookies
2 parents 3622a7d + e201228 commit dbbde8a

File tree

193 files changed

+6754
-16172
lines changed

Some content is hidden

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

193 files changed

+6754
-16172
lines changed

.env.example

+7
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ LARGE_HYPERBOLIC_MODEL= # Default: meta-llama/Meta-Llama-3.1-405-Instruc
3434
# Speech Synthesis
3535
ELEVENLABS_XI_API_KEY= # API key from elevenlabs
3636

37+
# Direct Client Setting
38+
EXPRESS_MAX_PAYLOAD= # Default: 100kb
39+
3740
# ElevenLabs Settings
3841
ELEVENLABS_MODEL_ID=eleven_multilingual_v2
3942
ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM
@@ -54,6 +57,7 @@ TWITTER_2FA_SECRET=
5457
TWITTER_POLL_INTERVAL=120 # How often (in seconds) the bot should check for interactions
5558
TWITTER_SEARCH_ENABLE=FALSE # Enable timeline search, WARNING this greatly increases your chance of getting banned
5659
TWITTER_TARGET_USERS= # Comma separated list of Twitter user names to interact with
60+
TWITTER_RETRY_LIMIT= # Maximum retry attempts for Twitter login
5761

5862
X_SERVER_URL=
5963
XAI_API_KEY=
@@ -256,6 +260,9 @@ LARGE_AKASH_CHAT_API_MODEL= # Default: Meta-Llama-3-1-405B-Instruct-FP8
256260
FAL_API_KEY=
257261
FAL_AI_LORA_PATH=
258262

263+
# Web search API Configuration
264+
TAVILY_API_KEY=
265+
259266
# WhatsApp Cloud API Configuration
260267
WHATSAPP_ACCESS_TOKEN= # Permanent access token from Facebook Developer Console
261268
WHATSAPP_PHONE_NUMBER_ID= # Phone number ID from WhatsApp Business API

.github/workflows/image.yaml

+56-47
Original file line numberDiff line numberDiff line change
@@ -9,53 +9,62 @@ on:
99

1010
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
1111
env:
12-
REGISTRY: ghcr.io
13-
IMAGE_NAME: ${{ github.repository }}
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: ${{ github.repository }}
1414

1515
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
1616
jobs:
17-
build-and-push-image:
18-
runs-on: ubuntu-latest
19-
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
20-
permissions:
21-
contents: read
22-
packages: write
23-
attestations: write
24-
id-token: write
25-
#
26-
steps:
27-
- name: Checkout repository
28-
uses: actions/checkout@v4
29-
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
30-
- name: Log in to the Container registry
31-
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
32-
with:
33-
registry: ${{ env.REGISTRY }}
34-
username: ${{ github.actor }}
35-
password: ${{ secrets.GITHUB_TOKEN }}
36-
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
37-
- name: Extract metadata (tags, labels) for Docker
38-
id: meta
39-
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
40-
with:
41-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42-
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
43-
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
44-
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
45-
- name: Build and push Docker image
46-
id: push
47-
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
48-
with:
49-
context: .
50-
push: true
51-
tags: ${{ steps.meta.outputs.tags }}
52-
labels: ${{ steps.meta.outputs.labels }}
53-
54-
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
55-
- name: Generate artifact attestation
56-
uses: actions/attest-build-provenance@v1
57-
with:
58-
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
59-
subject-digest: ${{ steps.push.outputs.digest }}
60-
push-to-registry: true
61-
17+
build-and-push-image:
18+
runs-on: ubuntu-latest
19+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
20+
permissions:
21+
contents: read
22+
packages: write
23+
attestations: write
24+
id-token: write
25+
#
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
30+
- name: Log in to the Container registry
31+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
37+
- name: Extract metadata (tags, labels) for Docker
38+
id: meta
39+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
40+
with:
41+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42+
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
43+
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
44+
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
45+
- name: Build and push Docker image
46+
id: push
47+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
48+
with:
49+
context: .
50+
push: true
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}
53+
54+
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
55+
- name: Generate artifact attestation
56+
uses: actions/attest-build-provenance@v1
57+
with:
58+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
59+
subject-digest: ${{ steps.push.outputs.digest }}
60+
push-to-registry: true
61+
62+
# This step makes the Docker image public, so users can pull it without authentication.
63+
- name: Make Docker image public
64+
run: |
65+
curl \
66+
-X PATCH \
67+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
68+
-H "Accept: application/vnd.github.v3+json" \
69+
https://api.github.com/user/packages/container/${{ env.IMAGE_NAME }}/visibility \
70+
-d '{"visibility":"public"}'

.github/workflows/integrationTests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches:
55
- "*"
6-
pull_request_target:
6+
pull_request:
77
branches:
88
- "*"
99
jobs:

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ tsup.config.bundled_*.mjs
5252

5353
coverage
5454
.eslintcache
55+
56+
agent/content

.gitpod.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ tasks:
33
- name: "init eliza env"
44
init: |
55
nvm install v23.3.0
6+
git fetch --tags
67
git checkout $(git describe --tags --abbrev=0)
78
command: pnpm install && pnpm run build

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ COPY --from=builder /app/scripts ./scripts
5252
COPY --from=builder /app/characters ./characters
5353

5454
# Set the command to run the application
55-
CMD ["pnpm", "start", "--non-interactive"]
55+
CMD ["pnpm", "start"]

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@
5050

5151
```bash
5252
git clone https://github.com/ai16z/eliza-starter.git
53-
53+
cd eliza-starter
5454
cp .env.example .env
55-
5655
pnpm i && pnpm build && pnpm start
5756
```
5857

README_CN.md

+59-8
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,81 @@
2121

2222
# 开始使用
2323

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

26+
- [Python 2.7+](https://www.python.org/downloads/)
2627
- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
27-
- Nodejs安装
2828
- [pnpm](https://pnpm.io/installation)
29-
- 使用pnpm
3029

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

33-
- - 将 .env.example 复制为 .env 并填写适当的值
32+
## (A) 使用启动器(Starter): 推荐
33+
34+
```
35+
git clone https://github.com/ai16z/eliza-starter.git
36+
cd eliza-starter
37+
cp .env.example .env
38+
```
39+
40+
## (B) 手动启动Eliza: 仅在您知道自己在做什么时才推荐
41+
42+
```
43+
git clone https://github.com/ai16z/eliza.git
44+
cd eliza
45+
# 切换最新发布的版本(Checkout the latest release)
46+
# Eliza的迭代速度非常快, 所以我们建议经常性的切换到最新的发布版本以免出现问题(This project iterates fast, so we recommend checking out the latest release)
47+
git checkout $(git describe --tags --abbrev=0)
48+
```
49+
50+
在将代码下载到本地后, 我们要做两件事:
51+
52+
### 1. 编辑.env文件(环境变量)
53+
54+
-`.env.example` 复制为 `.env` 并在其中填写适当的值
3455
- 编辑推特环境并输入你的推特账号和密码
3556

36-
### 编辑角色文件
57+
**最简化配置方案**:
58+
```
59+
OPENAI_API_KEY=sk-xxx # 配置OpenAI 的API, sk-开头, 注意, 目前不支持AzureOpenAI!
3760
38-
- 查看文件 `src/core/defaultCharacter.ts` - 您可以修改它
61+
## 如配置Twitter/X, 则需配置
62+
# Twitter/X Configuration
63+
TWITTER_DRY_RUN=false
64+
TWITTER_USERNAME=abc # Your Twitter/X account username
65+
TWITTER_PASSWORD=abc # Your Twitter/X account password
66+
TWITTER_EMAIL= xxx@gmail.com # Your Twitter/X account email
67+
TWITTER_COOKIES= '' # Your Twitter/X cookies, copy from broswer
68+
TWITTER_2FA_SECRET= # Two-factor authentication
69+
```
70+
71+
### 2. 编辑角色文件
72+
73+
- 标准的角色个性定义在文件 `characters/*.character.json`中, 您可以修改它或者直接使用它。
3974
- 您也可以使用 `node --loader ts-node/esm src/index.ts --characters="path/to/your/character.json"` 加载角色并同时运行多个机器人。
75+
- 需要说明的是, 在`characters/*.character.json`中, `clients字段对应**服务**, 默认可选`"twitter", "discord", "telegram"`等, 如果在`clients`中填入了如"twitter"等内容, 则需要在
76+
上面的`env`配置对应的环境变量。对`discord``telegram`同理。
77+
78+
```
79+
{
80+
"name": "trump",
81+
"clients": ["twitter"],
82+
"modelProvider": "openai",
83+
```
4084

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

4387
```
88+
(A) 使用启动器(Starter)
89+
sh scripts/start.sh
90+
91+
92+
(B) 手动启动Eliza
4493
pnpm i
94+
pnpm build
4595
pnpm start
4696
```
4797

98+
4899
# 自定义Eliza
49100

50101
### 添加常规行为

README_ES.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- 📚 Ingestión e interacción sencilla con documentos
1010
- 💾 Memoria recuperable y almacenamiento de documentos
1111
- 🚀 Altamente extensible - cree sus propias acciones y clientes para expandir capacidades
12-
- ☁️ Soporta múltiples modelos, incluyendo Llama local, OpenAI, Anthropic, Groq y más
12+
- ☁️ Soporta múltiples modelos, incluidos Llama local, OpenAI, Anthropic, Groq y más
1313
- 📦 Funciona perfectamente
1414

1515
## Usos
@@ -29,8 +29,8 @@
2929

3030
### Edite el archivo .env
3131

32-
- Copie .env.example a .env y complete los valores apropiados
33-
- Edite las variables de ambiente de TWITTER para agregar nombre de usuario y contraseña del bot
32+
- Copie el archivo .env.example a .env y complete los valores apropiados
33+
- Edite las variables de entorno de TWITTER para agregar nombre de usuario y contraseña del bot
3434

3535
### Edite el archivo de personaje
3636

README_FR.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
- 🛠 Support des connecteurs Discord/ Twitter / Telegram
88
- 🔗 Support des différents modèles d'IA (Llama, Grok, OpenAI, Anthropic, etc.)
99
- 👥 Gestion de plusieurs agents et assistance
10-
- 📚 Import et intéractions avec différents types de documents simplifiés
10+
- 📚 Import et interactions avec différents types de documents simplifiés
1111
- 💾 Accès aux données en mémoire et aux documents stockés
1212
- 🚀 Grande personnalisation possible : création de nouveaux clients et de nouvelles actions
1313
- 📦 Simplicité d'utilisation
1414

1515
Que pouvez-vous faire avec Eliza?
1616

1717
- 🤖 Chatbot
18-
- 🕵 ️Agents autonomes
18+
- 🕵 Agents autonomes
1919
- 📈 Processus automatisés
20-
- 🎮 PNJ intéractifs
20+
- 🎮 PNJ interactifs
2121
- 🧠 Trading automatisé
2222

2323
# Premiers pas
@@ -32,7 +32,7 @@ Que pouvez-vous faire avec Eliza?
3232
3333
### Editer le fichier .env
3434

35-
- Copier le fichier d'example et le remplir le avec les valeurs adéquates
35+
- Copier le fichier d'exemple .env.example et le remplir avec les valeurs adéquates
3636

3737
```
3838
cp .env.example .env
@@ -59,10 +59,10 @@ pnpm start
5959
pnpm clean
6060
```
6161

62-
#### Ressources additionelles
62+
#### Ressources additionnelles
6363

6464
Il vous faudra peut-être installer Sharp.
65-
Si il y a une erreur lors du lancement du bot, essayez d'installer Sharp comme ceci :
65+
S'il y a une erreur lors du lancement du bot, essayez d'installer Sharp comme ceci :
6666

6767
```
6868
pnpm install --include=optional sharp

README_IT.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
- 🛠️ Connettori completi per Discord, Twitter e Telegram
1010
- 🔗 Supporto per tutti i modelli (Llama, Grok, OpenAI, Anthropic, ecc.)
1111
- 👥 Supporto multi-agente e per stanze
12-
- 📚 Acquisisci ed interagisci facilmente con i tuoi documenti
12+
- 📚 Acquisisci e interagisci facilmente con i tuoi documenti
1313
- 💾 Memoria recuperabile e archivio documenti
1414
- 🚀 Altamente estensibile - crea le tue azioni e clients personalizzati
1515
- ☁️ Supporto di numerosi modelli (Llama locale, OpenAI, Anthropic, Groq, ecc.)
1616
- 📦 Funziona e basta!
1717

18-
## 🎯 Casi d'Uso
18+
## 🎯 Casi d'uso
1919

2020
- 🤖 Chatbot
2121
- 🕵️ Agenti Autonomi
22-
- 📈 Gestione Processi Aziendali
22+
- 📈 Gestione dei processi aziendali
2323
- 🎮 NPC per Videogiochi
2424
- 🧠 Trading
2525

@@ -51,7 +51,7 @@ sh scripts/start.sh
5151

5252
### Modifica il file del personaggio
5353

54-
1. Apri `packages/agent/src/character.ts` per modificare il personaggio predefinito. Decommentare e modificare.
54+
1. Apri `packages/agent/src/character.ts` per modificare il personaggio predefinito. Decommenta e modifica.
5555

5656
2. Per caricare personaggi personalizzati:
5757
- Usa `pnpm start --characters="percorso/del/tuo/personaggio.json"`
@@ -76,10 +76,10 @@ Potrebbe essere necessario installare Sharp. Se vedi un errore all'avvio, prova
7676
pnpm install --include=optional sharp
7777
```
7878

79-
### Community e contatti
79+
### Comunità e contatti
8080

81-
- [GitHub Issues](https://github.com/ai16z/eliza/issues). Ideale per: bug riscontrati utilizzando Eliza e proposte di funzionalità.
82-
- [Discord](https://discord.gg/ai16z). Ideale per: condividere le tue applicazioni e interagire con la community.
81+
- [GitHub Issues](https://github.com/ai16z/eliza/issues). Ideale per segnalare bug riscontrati durante l’utilizzo di Eliza e proporre nuove funzionalità.
82+
- [Discord](https://discord.gg/ai16z). Ideale per condividere le tue applicazioni e interagire con la comunità.
8383

8484
## Contributori
8585

0 commit comments

Comments
 (0)