Skip to content

Commit

Permalink
Merge branch 'develop' into feat/express-payload-config
Browse files Browse the repository at this point in the history
  • Loading branch information
monilpat authored Dec 19, 2024
2 parents 4004a02 + 2f157b6 commit 4dd6d89
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 21 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ TWITTER_COOKIES= # Account cookies
TWITTER_POLL_INTERVAL=120 # How often (in seconds) the bot should check for interactions
TWITTER_SEARCH_ENABLE=FALSE # Enable timeline search, WARNING this greatly increases your chance of getting banned
TWITTER_TARGET_USERS= # Comma separated list of Twitter user names to interact with
TWITTER_RETRY_LIMIT= # Maximum retry attempts for Twitter login

X_SERVER_URL=
XAI_API_KEY=
Expand Down
6 changes: 3 additions & 3 deletions README_ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- 📚 Ingestión e interacción sencilla con documentos
- 💾 Memoria recuperable y almacenamiento de documentos
- 🚀 Altamente extensible - cree sus propias acciones y clientes para expandir capacidades
- ☁️ Soporta múltiples modelos, incluyendo Llama local, OpenAI, Anthropic, Groq y más
- ☁️ Soporta múltiples modelos, incluidos Llama local, OpenAI, Anthropic, Groq y más
- 📦 Funciona perfectamente

## Usos
Expand All @@ -29,8 +29,8 @@

### Edite el archivo .env

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

### Edite el archivo de personaje

Expand Down
12 changes: 6 additions & 6 deletions README_FR.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
- 🛠 Support des connecteurs Discord/ Twitter / Telegram
- 🔗 Support des différents modèles d'IA (Llama, Grok, OpenAI, Anthropic, etc.)
- 👥 Gestion de plusieurs agents et assistance
- 📚 Import et intéractions avec différents types de documents simplifiés
- 📚 Import et interactions avec différents types de documents simplifiés
- 💾 Accès aux données en mémoire et aux documents stockés
- 🚀 Grande personnalisation possible : création de nouveaux clients et de nouvelles actions
- 📦 Simplicité d'utilisation

Que pouvez-vous faire avec Eliza?

- 🤖 Chatbot
- 🕵 ️Agents autonomes
- 🕵 Agents autonomes
- 📈 Processus automatisés
- 🎮 PNJ intéractifs
- 🎮 PNJ interactifs
- 🧠 Trading automatisé

# Premiers pas
Expand All @@ -32,7 +32,7 @@ Que pouvez-vous faire avec Eliza?
### Editer le fichier .env

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

```
cp .env.example .env
Expand All @@ -59,10 +59,10 @@ pnpm start
pnpm clean
```

#### Ressources additionelles
#### Ressources additionnelles

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

```
pnpm install --include=optional sharp
Expand Down
14 changes: 7 additions & 7 deletions README_IT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
- 🛠️ Connettori completi per Discord, Twitter e Telegram
- 🔗 Supporto per tutti i modelli (Llama, Grok, OpenAI, Anthropic, ecc.)
- 👥 Supporto multi-agente e per stanze
- 📚 Acquisisci ed interagisci facilmente con i tuoi documenti
- 📚 Acquisisci e interagisci facilmente con i tuoi documenti
- 💾 Memoria recuperabile e archivio documenti
- 🚀 Altamente estensibile - crea le tue azioni e clients personalizzati
- ☁️ Supporto di numerosi modelli (Llama locale, OpenAI, Anthropic, Groq, ecc.)
- 📦 Funziona e basta!

## 🎯 Casi d'Uso
## 🎯 Casi d'uso

- 🤖 Chatbot
- 🕵️ Agenti Autonomi
- 📈 Gestione Processi Aziendali
- 📈 Gestione dei processi aziendali
- 🎮 NPC per Videogiochi
- 🧠 Trading

Expand Down Expand Up @@ -51,7 +51,7 @@ sh scripts/start.sh

### Modifica il file del personaggio

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

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

### Community e contatti
### Comunità e contatti

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

## Contributori

Expand Down
4 changes: 2 additions & 2 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ function initializeDbCache(character: Character, db: IDatabaseCacheAdapter) {

async function startAgent(
character: Character,
directClient
directClient: DirectClient
): Promise<AgentRuntime> {
let db: IDatabaseAdapter & IDatabaseCacheAdapter;
try {
Expand Down Expand Up @@ -653,7 +653,7 @@ const startAgents = async () => {
}

// upload some agent functionality into directClient
directClient.startAgent = async (character) => {
directClient.startAgent = async (character: Character) => {
// wrap it so we don't have to inject directClient later
return startAgent(character, directClient);
};
Expand Down
2 changes: 1 addition & 1 deletion characters/trump.character.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"plugins": [],
"bio": [
"SAVED America from the China Virus (while they let cities burn)",
"SAVED America from COVID-19 (while they let cities burn)",
"secured the Southern Border COMPLETELY (until they DESTROYED it)",
"protected WOMEN'S SPORTS (while Democrats let MEN compete)",
"ended INFLATION and made America AFFORDABLE (until Kamala ruined it)",
Expand Down
5 changes: 4 additions & 1 deletion client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { defineConfig } from "vite";
import topLevelAwait from "vite-plugin-top-level-await";
import react from "@vitejs/plugin-react";
import wasm from "vite-plugin-wasm";
import { config } from "dotenv";

config({ path: path.resolve(__dirname, "../.env") });

// https://vite.dev/config/
export default defineConfig({
Expand All @@ -26,7 +29,7 @@ export default defineConfig({
server: {
proxy: {
"/api": {
target: "http://localhost:3000",
target: `http://localhost:${process.env.SERVER_PORT || 3000}`,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
Expand Down
5 changes: 4 additions & 1 deletion packages/client-twitter/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ export class ClientBase extends EventEmitter {
const username = this.runtime.getSetting("TWITTER_USERNAME");
const password = this.runtime.getSetting("TWITTER_PASSWORD");
const email = this.runtime.getSetting("TWITTER_EMAIL");
let retries = parseInt(
this.runtime.getSetting("TWITTER_RETRY_LIMIT") || "5",
10
);
const twitter2faSecret =
this.runtime.getSetting("TWITTER_2FA_SECRET") || undefined;
const cookies = this.runtime.getSetting("TWITTER_COOKIES");
Expand All @@ -180,7 +184,6 @@ export class ClientBase extends EventEmitter {
}

elizaLogger.log("Waiting for Twitter login");
let retries = 5; // Optional: Set a retry limit
while (retries > 0) {
const cookies = await this.twitterClient.getCookies();
if ((await this.twitterClient.isLoggedIn()) && !!cookies) {
Expand Down

0 comments on commit 4dd6d89

Please sign in to comment.