Skip to content

Commit c309e21

Browse files
authored
Merge branch 'develop' into develop
2 parents e49b051 + ea8cfb3 commit c309e21

File tree

174 files changed

+1762
-1028
lines changed

Some content is hidden

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

174 files changed

+1762
-1028
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
@@ -55,6 +58,7 @@ TWITTER_COOKIES= # Account cookies
5558
TWITTER_POLL_INTERVAL=120 # How often (in seconds) the bot should check for interactions
5659
TWITTER_SEARCH_ENABLE=FALSE # Enable timeline search, WARNING this greatly increases your chance of getting banned
5760
TWITTER_TARGET_USERS= # Comma separated list of Twitter user names to interact with
61+
TWITTER_RETRY_LIMIT= # Maximum retry attempts for Twitter login
5862

5963
X_SERVER_URL=
6064
XAI_API_KEY=
@@ -264,6 +268,9 @@ LARGE_AKASH_CHAT_API_MODEL= # Default: Meta-Llama-3-1-405B-Instruct-FP8
264268
FAL_API_KEY=
265269
FAL_AI_LORA_PATH=
266270

271+
# Web search API Configuration
272+
TAVILY_API_KEY=
273+
267274
# WhatsApp Cloud API Configuration
268275
WHATSAPP_ACCESS_TOKEN= # Permanent access token from Facebook Developer Console
269276
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"}'

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

agent/src/index.ts

+11-3
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,11 @@ export async function loadCharacters(
218218
export function getTokenForProvider(
219219
provider: ModelProviderName,
220220
character: Character
221-
) {
221+
):string {
222222
switch (provider) {
223+
// no key needed for llama_local
224+
case ModelProviderName.LLAMALOCAL:
225+
return ''
223226
case ModelProviderName.OPENAI:
224227
return (
225228
character.settings?.secrets?.OPENAI_API_KEY ||
@@ -242,6 +245,7 @@ export function getTokenForProvider(
242245
character.settings?.secrets?.OPENAI_API_KEY ||
243246
settings.OPENAI_API_KEY
244247
);
248+
case ModelProviderName.CLAUDE_VERTEX:
245249
case ModelProviderName.ANTHROPIC:
246250
return (
247251
character.settings?.secrets?.ANTHROPIC_API_KEY ||
@@ -313,6 +317,10 @@ export function getTokenForProvider(
313317
character.settings?.secrets?.AKASH_CHAT_API_KEY ||
314318
settings.AKASH_CHAT_API_KEY
315319
);
320+
default:
321+
const errorMessage = `Failed to get token - unsupported model provider: ${provider}`
322+
elizaLogger.error(errorMessage)
323+
throw new Error(errorMessage)
316324
}
317325
}
318326

@@ -582,7 +590,7 @@ function initializeDbCache(character: Character, db: IDatabaseCacheAdapter) {
582590

583591
async function startAgent(
584592
character: Character,
585-
directClient
593+
directClient: DirectClient
586594
): Promise<AgentRuntime> {
587595
let db: IDatabaseAdapter & IDatabaseCacheAdapter;
588596
try {
@@ -675,7 +683,7 @@ const startAgents = async () => {
675683
}
676684

677685
// upload some agent functionality into directClient
678-
directClient.startAgent = async (character) => {
686+
directClient.startAgent = async (character: Character) => {
679687
// wrap it so we don't have to inject directClient later
680688
return startAgent(character, directClient);
681689
};

characters/trump.character.json

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
},
1111
"plugins": [],
1212
"bio": [
13-
"SAVED America from the China Virus (while they let cities burn)",
1413
"secured the Southern Border COMPLETELY (until they DESTROYED it)",
1514
"protected WOMEN'S SPORTS (while Democrats let MEN compete)",
1615
"ended INFLATION and made America AFFORDABLE (until Kamala ruined it)",

client/vite.config.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { defineConfig } from "vite";
33
import topLevelAwait from "vite-plugin-top-level-await";
44
import react from "@vitejs/plugin-react";
55
import wasm from "vite-plugin-wasm";
6+
import { config } from "dotenv";
7+
8+
config({ path: path.resolve(__dirname, "../.env") });
69

710
// https://vite.dev/config/
811
export default defineConfig({
@@ -26,7 +29,7 @@ export default defineConfig({
2629
server: {
2730
proxy: {
2831
"/api": {
29-
target: "http://localhost:3000",
32+
target: `http://localhost:${process.env.SERVER_PORT || 3000}`,
3033
changeOrigin: true,
3134
rewrite: (path) => path.replace(/^\/api/, ""),
3235
},

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## 🌍 README Translations
88

9-
[中文说明](./README_CN.md) | [Français](./README_FR.md) | [ไทย](./README_TH.md)
9+
[中文说明](./README_CN.md) | [Deutsch](./README_DE.md) | [Français](./README_FR.md) | [ไทย](./README_TH.md)
1010

1111
# dev branch
1212

0 commit comments

Comments
 (0)