From 8267782c99d063ee226772089e0cfbbbcdbc16c2 Mon Sep 17 00:00:00 2001 From: kwan <41404218+kwanRoshi@users.noreply.github.com> Date: Wed, 8 Jan 2025 03:23:46 +1300 Subject: [PATCH 1/6] update --- README.md | 162 --------- README_AR.md | 133 -------- README_DE.md | 128 ------- README_ES.md | 181 ---------- README_FR.md | 84 ----- README_HE.md | 194 ----------- README_HU.md | 133 -------- README_IT.md | 92 ----- README_JA.md | 181 ---------- README_KOR.md | 129 ------- README_PL.md | 137 -------- README_PTBR.md | 183 ---------- README_RS.md | 181 ---------- README_RU.md | 188 ---------- README_TG.md | 129 ------- README_TH.md | 129 ------- README_TR.md | 92 ----- README_VI.md | 129 ------- characters/dobby.character.json | 97 +++++- characters/images.json | 38 +++ characters/your-bot.json | 42 +++ packages/plugin-twitter/README.md | 417 +++++++++++------------ packages/plugin-twitter/src/monitor.ts | 190 +++++++++++ packages/plugin-twitter/src/templates.ts | 216 ++++++++++++ 24 files changed, 760 insertions(+), 2825 deletions(-) delete mode 100644 README.md delete mode 100644 README_AR.md delete mode 100644 README_DE.md delete mode 100644 README_ES.md delete mode 100644 README_FR.md delete mode 100644 README_HE.md delete mode 100644 README_HU.md delete mode 100644 README_IT.md delete mode 100644 README_JA.md delete mode 100644 README_KOR.md delete mode 100644 README_PL.md delete mode 100644 README_PTBR.md delete mode 100644 README_RS.md delete mode 100644 README_RU.md delete mode 100644 README_TG.md delete mode 100644 README_TH.md delete mode 100644 README_TR.md delete mode 100644 README_VI.md create mode 100644 characters/images.json create mode 100644 characters/your-bot.json create mode 100644 packages/plugin-twitter/src/monitor.ts diff --git a/README.md b/README.md deleted file mode 100644 index 11066daffe..0000000000 --- a/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [Documentation](https://elizaos.github.io/eliza/) | 🎯 [Examples](https://github.com/thejoven/awesome-eliza) - -
- -## 🌍 README Translations - -[中文说明](./README_CN.md) | [日本語の説明](./README_JA.md) | [한국어 설명](./README_KOR.md) | [Français](./README_FR.md) | [Português](./README_PTBR.md) | [Türkçe](./README_TR.md) | [Русский](./README_RU.md) | [Español](./README_ES.md) | [Italiano](./README_IT.md) | [ไทย](./README_TH.md) | [Deutsch](./README_DE.md) | [Tiếng Việt](./README_VI.md) | [עִברִית](https://github.com/elizaos/Elisa/blob/main/README_HE.md) | [Tagalog](./README_TG.md) | [Polski](./README_PL.md) | [Arabic](./README_AR.md) | [Hungarian](./README_HU.md) | [Srpski](./README_RS.md) - -## 🚩 Overview - -
- Eliza Diagram -
- -## ✨ Features - -- 🛠️ Full-featured Discord, Twitter and Telegram connectors -- 🔗 Support for every model (Llama, Grok, OpenAI, Anthropic, etc.) -- 👥 Multi-agent and room support -- 📚 Easily ingest and interact with your documents -- 💾 Retrievable memory and document store -- 🚀 Highly extensible - create your own actions and clients -- ☁️ Supports many models (local Llama, OpenAI, Anthropic, Groq, etc.) -- 📦 Just works! - -## Video Tutorials - -[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL) - -## 🎯 Use Cases - -- 🤖 Chatbots -- 🕵️ Autonomous Agents -- 📈 Business Process Handling -- 🎮 Video Game NPCs -- 🧠 Trading - -## 💰 If you plan to launch a token - -This framework is the number one open source project on github, we are enabling the next generation of human-machine interface but we still need your help to ensure the code is of the utmost quality with response rapid to critical issues that will affect our builder community at large. - -To ensure sustainable development and continued innovation, we ask contributions of 5-10% of initial token distributions from successful launches. - -All contributions are publicly tracked on-chain and used exclusively for ecosystem development. - -### ⚠️ Don't forget to tip the big guy 10%: ⚠️ -[AM84n1iLdxgVTAyENBcLdjXoyvjentTbu5Q6EpKV1PeG](https://solscan.io/account/AM84n1iLdxgVTAyENBcLdjXoyvjentTbu5Q6EpKV1PeG) - -## 🚀 Quick Start - -### Prerequisites - -- [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) - -> **Note for Windows Users:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) is required. - -### Use the Starter (Recommended) - -```bash -git clone https://github.com/elizaos/eliza-starter.git -cd eliza-starter -cp .env.example .env -pnpm i && pnpm build && pnpm start -``` - -Once the agent is running, you should see the message to run "pnpm start:client" at the end. -Open another terminal and move to same directory and then run below command and follow the URL to chat to your agent. - -```bash -pnpm start:client -``` - -Then read the [Documentation](https://elizaos.github.io/eliza/) to learn how to customize your Eliza. - -### Manually Start Eliza (Only recommended if you know what you are doing) - -```bash -# Clone the repository -git clone https://github.com/elizaos/eliza.git - -# Checkout the latest release -# This project iterates fast, so we recommend checking out the latest release -git checkout $(git describe --tags --abbrev=0) -``` - -### Start Eliza with Gitpod - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### Edit the .env file - -Copy .env.example to .env and fill in the appropriate values. - -``` -cp .env.example .env -``` - -Note: .env is optional. If you're planning to run multiple distinct agents, you can pass secrets through the character JSON -Note: .env is optional. If you're planning to run multiple distinct agents, you can pass secrets through the character JSON - -### Automatically Start Eliza - -This will run everything to set up the project and start the bot with the default character. - -```bash -sh scripts/start.sh -``` - -### Edit the character file - -1. Open `packages/core/src/defaultCharacter.ts` to modify the default character. Uncomment and edit. - -2. To load custom characters: - - Use `pnpm start --characters="path/to/your/character.json"` - - Multiple character files can be loaded simultaneously -3. Connect with X (Twitter) - - change `"clients": []` to `"clients": ["twitter"]` in the character file to connect with X - -### Manually Start Eliza - -```bash -pnpm i -pnpm build -pnpm start - -# The project iterates fast, sometimes you need to clean the project if you are coming back to the project -pnpm clean -``` - -#### Additional Requirements - -You may need to install Sharp. If you see an error when starting up, try installing it with the following command: - -``` -pnpm install --include=optional sharp -``` - -### Community & contact - -- [GitHub Issues](https://github.com/elizaos/eliza/issues). Best for: bugs you encounter using Eliza, and feature proposals. -- [Discord](https://discord.gg/ai16z). Best for: sharing your applications and hanging out with the community. -- [Developer Discord](https://discord.gg/3f67SH4rXT). Best for: getting help and plugin development. - -## Contributors - - - - - -## Star History - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_AR.md b/README_AR.md deleted file mode 100644 index c2597ebf7b..0000000000 --- a/README_AR.md +++ /dev/null @@ -1,133 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [التعليمات](https://elizaos.github.io/eliza/) | 🎯 [الأمثلة](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ ما هي الميزات؟ - -- 🛠️ اتصالات مجهزة بالكامل لديسكورد، تويتر، وتيليغرام. -- 👥 دعم متعدد للوكلاء والغرف. -- 📚 التفاعل بإتقان مع المستندات كما يمكن فحصها بسهولة. -- 💾 ذاكرة قوية قابلة لاسترجاع ما فاتك! وكذلك مساحة كافية للتخزين -- 🚀 سريعة الانتشار بشكل غير مسبوق، هيّا! تفاعل واصنع عملاء خاصين بك. -- ☁️ تدعم العديد من النماذج مثل:- - - لاما (نموذج مفتوح المصدر للذكاء الاصطناعي Llama). - - جروك (نظام ذكاء اصطناعي متقدم Grok). - - أوبن إيه آي (OpenAI نماذج ذكاء اصطناعي مثل ChatGPT). - - أنثروبيك Anthropic وغيرها من النماذج الأخرى! -- 📦 جاهزة للعمل أي وقت وبسهولة! - -## 🎯 كيف ستفيدني؟ - -- 🤖 روبوتات الدردشة. -- 🕵️ وكلاء مستقلون. -- 📈 إدارة الأعمال. -- 🎮 في الجيميز NPCs أو الشخصيات التي يتحكم بها الحاسوب فقط وليس اللاعب. -- 🧠 التداول. - -## 🚀 ابدأ الآن! - -### ماذا عن المتطلبات الأساسية؟ - -- [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) - -> **لمتسخدمي الويندوز يجب أن يكون لديك نظام ويندوز الفرعي للينكس:** [WSL 2](https://learn.microsoft.com/de-de/windows/wsl/install-manual). - -### استخدام النسخة المبدئية (موصى به) - -```bash -git clone https://github.com/elizaos/eliza-starter.git - -cp .env.example .env - -pnpm i && pnpm start -``` - -تعلم أكثر عن كيفية تخصيص إليزا من هنا [التعليمات](https://elizaos.github.io/eliza/) - -### إذا كان لديك خبرة بالفعل، يُمكنك تشغيل إليزا يدويًا. - -```bash -# انشئ نسخة -git clone https://github.com/elizaos/eliza.git - -# ألق نظرة على آخر تحديث -# هذا المشروع يتطور بسرعة، لذا، أوصيك باستخدام أحدث إصدار -git checkout $(git describe --tags --abbrev=0) -``` - -### تشغل إليزا مع Gitpod - -[![In Gitpod öffnen](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### عدّل ملف .env-Datei - -انسخ ملف .env.example إلى .env واملأ القيم المناسبة. - -``` -cp .env.example .env -``` - -ضع في الإعتبار أن ملف .env اختياري. إذا كنت تخطط لتشغيل عدة وكلاء مختلفين، ابعت الـsecrets من خلال ملف JSON الخاص بالشخصية. - -### تشغيل إليزا تلقائيًا - -هذا الكود لتنفيذ جميع الخطوات اللازمة لإعداد المشروع وكذلك تشغيل الروبوت مع الشخصية الافتراضية. - -```bash -sh scripts/start.sh -``` - -### لتعديل ملف الشخصية - -افتح ملف agent/src/character.ts لتعديل الشخصية الافتراضية. قم بإلغاء التعليق وعدّل عليها. - -لتحميل شخصيات مخصصة - - استخدم الأمر "pnpm start --characters="path/to/your/character.json - - يُمكنك تحميل عدة ملفات للشخصيات في نفس الوقت. - -الاتصال بـ X (تويتر): - - غيّر "clients": [] إلى "clients": ["twitter"] في ملف الشخصية للاتصال بـ X أو تويتر - -### لتشغيل إليزا يدويًا - -```bash -pnpm i -pnpm build -pnpm start - -# المشروع يتطور سريعًا. لذا قد تحتاج إلى تنظيف المشروع إذا قمت بالرجوع إليه بعد فترة. -pnpm clean -``` - -#### المتطلبات الإضافية - -قد تحتاج إلى تثبيت Sharp. إذا واجهت خطأ أثناء بدء التشغيل، جرب استخدام الأمر التالي: - -``` -pnpm install --include=optional sharp -``` - -### المجتمع والدعم - -- في حال إذا واجهت أي مشاكل تتعلق باستخدام إليزا ولتقديم المقترحات [GitHub Issues](https://github.com/elizaos/eliza/issues). -- لمشاركة تطبيقاتك والتفاعل مع المجتمع [Discord](https://discord.gg/ai16z). - -## المُساهمون - - - - - -## تاريخ النجوم - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_DE.md b/README_DE.md deleted file mode 100644 index c1bf8b4b25..0000000000 --- a/README_DE.md +++ /dev/null @@ -1,128 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [Dokumentation](https://elizaos.github.io/eliza/) | 🎯 [Beispiele](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ Funktionen - -- 🛠️ Voll ausgestattete Konnektoren für Discord, Twitter und Telegram -- 👥 Multi-Agenten- und Raumunterstützung -- 📚 Einfache Verarbeitung und Interaktion mit deinen Dokumenten -- 💾 Abrufbarer Speicher und Dokumentenspeicher -- 🚀 Hochgradig erweiterbar – erstelle deine eigenen Aktionen und Clients -- ☁️ Unterstützt viele Modelle (lokales Llama, OpenAI, Anthropic, Groq usw.) -- 📦 Einfach funktionsfähig! - -## 🎯 Anwendungsfälle - -- 🤖 Chatbots -- 🕵️ Autonome Agenten -- 📈 Geschäftsprozessmanagement -- 🎮 NPCs in Videospielen -- 🧠 Handel - -## 🚀 Schnelleinstieg - -### Voraussetzungen - -- [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) - -> **Hinweis für Windows-Benutzer:** [WSL 2](https://learn.microsoft.com/de-de/windows/wsl/install-manual) ist erforderlich. - -### Nutzung des Starters (Empfohlen) - -```bash -git clone https://github.com/elizaos/eliza-starter.git - -cp .env.example .env - -pnpm i && pnpm start -``` - -Lies dann die [Dokumentation](https://elizaos.github.io/eliza/), um zu erfahren, wie du Eliza anpassen kannst. - -### Manuelles Starten von Eliza (Nur empfohlen, wenn du genau weißt, was du tust) - -```bash -# Repository klonen -git clone https://github.com/elizaos/eliza.git - -# Wechsle zur neuesten Version -# Dieses Projekt entwickelt sich schnell weiter, daher empfehlen wir, die neueste Version zu verwenden -git checkout $(git describe --tags --abbrev=0) -``` - -### Eliza mit Gitpod starten - -[![In Gitpod öffnen](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### Bearbeite die .env-Datei - -Kopiere .env.example nach .env und fülle die entsprechenden Werte aus. - -``` -cp .env.example .env -``` - -Hinweis: .env ist optional. Wenn du vorhast, mehrere unterschiedliche Agenten auszuführen, kannst du Geheimnisse über die Charakter-JSON übergeben. - -### Eliza automatisch starten - -Dies führt alle notwendigen Schritte aus, um das Projekt einzurichten und den Bot mit dem Standardcharakter zu starten. - -```bash -sh scripts/start.sh -``` - -### Charakterdatei bearbeiten - -1. Öffne `agent/src/character.ts`, um den Standardcharakter zu bearbeiten. Kommentiere und bearbeite ihn. - -2. Um benutzerdefinierte Charaktere zu laden: - - Verwende `pnpm start --characters="path/to/your/character.json"` - - Mehrere Charakterdateien können gleichzeitig geladen werden. -3. Verbinde mit X (Twitter) - - Ändere `"clients": []` zu `"clients": ["twitter"]` in der Charakterdatei, um eine Verbindung mit X herzustellen. - -### Eliza manuell starten - -```bash -pnpm i -pnpm build -pnpm start - -# Das Projekt entwickelt sich schnell weiter. Manchmal musst du das Projekt bereinigen, wenn du es nach einiger Zeit erneut aufrufst. -pnpm clean -``` - -#### Zusätzliche Anforderungen - -Möglicherweise musst du Sharp installieren. Wenn beim Starten ein Fehler auftritt, versuche es mit folgendem Befehl: - -``` -pnpm install --include=optional sharp -``` - -### Community & Kontakt - -- [GitHub Issues](https://github.com/elizaos/eliza/issues). Am besten geeignet für: Bugs, die du bei der Nutzung von Eliza findest, und Feature-Vorschläge. -- [Discord](https://discord.gg/ai16z). Am besten geeignet für: das Teilen deiner Anwendungen und den Austausch mit der Community. - -## Contributors - - - - - -## Star History - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_ES.md b/README_ES.md deleted file mode 100644 index 17156e094c..0000000000 --- a/README_ES.md +++ /dev/null @@ -1,181 +0,0 @@ -# Eliza - -Banner de Eliza - -## Funcionalidades - -- 🛠 Conectores completos para Discord, Twitter y Telegram -- 👥 Soporte para múltiples agentes y salas -- 📚 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, incluidos Llama local, OpenAI, Anthropic, Groq y más -- 📦 Funciona perfectamente - -## Usos - -- 🤖 Chatbots -- 🕵️ Agentes autónomos -- 📈 Gestión de procesos empresariales -- 🎮 NPCs en videojuegos - -# Primeros Pasos - -**Requisitos (OBLIGATORIOS):** - -- [Python 2.7+](https://www.python.org/downloads/) -- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -- [pnpm](https://pnpm.io/installation) - -### Edite el archivo .env - -- 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 - -- Revise el archivo `src/core/defaultCharacter.ts` - puede modificarlo -- También puede cargar personajes con el comando `pnpm start --characters="path/to/your/character.json"` y ejecutar múltiples bots simultáneamente. - -Después de configurar el archivo .env y el archivo de personaje, puede iniciar el bot con: - -``` -pnpm i -pnpm start -``` - -# Personalizando a Eliza - -### Agregando acciones personalizadas - -Para evitar conflictos en el directorio central, se recomienda agregar acciones personalizadas a un directorio `custom_actions` y luego agregarlas al archivo `elizaConfig.yaml`. Consulte el archivo `elizaConfig.example.yaml` para un ejemplo. - -## Ejecución con Diferentes Modelos - -### Ejecutar con Llama - -Puede ejecutar modelos Llama 70B o 405B configurando la variable de ambiente `XAI_MODEL` en `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` o `meta-llama/Meta-Llama-3.1-405B-Instruct` - -### Ejecutar con Grok - -Puede ejecutar modelos Grok configurando la variable de ambiente `XAI_MODEL` en `grok-beta` - -### Ejecutar con OpenAI - -Puede ejecutar modelos OpenAI configurando la variable de ambiente `XAI_MODEL` en `gpt-4o-mini` o `gpt-4o` - -## Requisitos Adicionales - -Puede ser necesario instalar Sharp. Si encuentra un error al iniciar, intente instalarlo con: - -``` -pnpm install --include=optional sharp -``` - -# Configuración del Entorno - -Deberá agregar variables de ambiente a su archivo .env para conectarse a varias plataformas: - -``` -# Variables de ambiente obligatorias -DISCORD_APPLICATION_ID= -DISCORD_API_TOKEN= # Token del bot -OPENAI_API_KEY=sk-* # Clave API de OpenAI, comenzando con sk- -ELEVENLABS_XI_API_KEY= # Clave API de ElevenLabs -GOOGLE_GENERATIVE_AI_API_KEY= # Clave API de Gemini - -# CONFIGURACIONES DE ELEVENLABS -ELEVENLABS_MODEL_ID=eleven_multilingual_v2 -ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM -ELEVENLABS_VOICE_STABILITY=0.5 -ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 -ELEVENLABS_VOICE_STYLE=0.66 -ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false -ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 -ELEVENLABS_OUTPUT_FORMAT=pcm_16000 - -TWITTER_DRY_RUN=false -TWITTER_USERNAME= # Nombre de usuario de la cuenta -TWITTER_PASSWORD= # Contraseña de la cuenta -TWITTER_EMAIL= # Correo electrónico de la cuenta - -X_SERVER_URL= -XAI_API_KEY= -XAI_MODEL= - -# Para consultar a Claude -ANTHROPIC_API_KEY= - -# EVM -EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY - -# Solana -SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -# Fallback Wallet Configuration (deprecated) -WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -BIRDEYE_API_KEY= - -SOL_ADDRESS=So11111111111111111111111111111111111111112 -SLIPPAGE=1 -RPC_URL=https://api.mainnet-beta.solana.com -HELIUS_API_KEY= - -## Telegram -TELEGRAM_BOT_TOKEN= - -TOGETHER_API_KEY= -``` - -# Configuración de Inferencia Local - -### Configuración CUDA - -Si tiene una GPU NVIDIA, puede instalar CUDA para acelerar significativamente la inferencia local. - -``` -pnpm install -npx --no node-llama-cpp source download --gpu cuda -``` - -Asegúrese de tener instalado el CUDA Toolkit, incluyendo cuDNN y cuBLAS. - -### Ejecución local - -Agregue XAI_MODEL y configúrelo con una de las opciones de [Ejecutar con Llama](#ejecutar-con-llama) - puede dejar X_SERVER_URL y XAI_API_KEY en blanco, descargará el modelo de HuggingFace y realizará consultas localmente - -# Clientes - -## Bot de Discord - -Para ayuda con la configuración de su Bot de Discord, consulte: https://discordjs.guide/preparations/setting-up-a-bot-application.html - -# Desarrollo - -## Pruebas - -Para ejecutar la suite de pruebas: - -```bash -pnpm test # Ejecutar pruebas una vez -pnpm test:watch # Ejecutar pruebas en modo observación -``` - -Para pruebas específicas de base de datos: - -```bash -pnpm test:sqlite # Ejecutar pruebas con SQLite -pnpm test:sqljs # Ejecutar pruebas con SQL.js -``` - -Las pruebas están escritas con Jest y se pueden encontrar en archivos `src/**/*.test.ts`. El entorno de pruebas está configurado para: - -- Cargar variables de ambiente desde `.env.test` -- Usar un límite de 2 minutos para pruebas de larga duración -- Soportar módulos ESM -- Ejecutar pruebas en secuencia (--runInBand) - -Para crear nuevas pruebas, agregue un archivo `.test.ts` junto al código que está probando. diff --git a/README_FR.md b/README_FR.md deleted file mode 100644 index 6f120c1f00..0000000000 --- a/README_FR.md +++ /dev/null @@ -1,84 +0,0 @@ -# Eliza - -Eliza Banner - -## Fonctionnalités - -- 🛠 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 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 -- 📈 Processus automatisés -- 🎮 PNJ interactifs -- 🧠 Trading automatisé - -# Premiers pas - -**Pré-requis (obligatoire) :** - -- [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) - -> **Note pour Windows :** WSL est requis - -### Editer le fichier .env - -- Copier le fichier d'exemple .env.example et le remplir avec les valeurs adéquates - -``` -cp .env.example .env -``` - -### Modifier les fichiers personnage - -1. Ouvrir le document `src/core/defaultCharacter.ts` afin de modifier le personnage par défaut - -2. Pour ajouter des personnages personnalisés : - - Lancer la commande `pnpm start --characters="path/to/your/character.json"` - - Plusieurs fichiers personnages peuvent être ajoutés en même temps - -### Lancer Eliza - -Après avoir terminé la configuration et les fichiers personnage, lancer le bot en tapant la ligne de commande suivante: - -```bash -pnpm i -pnpm build -pnpm start - -# Le projet étant régulièrement mis à jour, il vous faudra parfois le nettoyer avant de recommencer à travailler dessus -pnpm clean -``` - -#### Ressources additionnelles - -Il vous faudra peut-être installer Sharp. -S'il y a une erreur lors du lancement du bot, essayez d'installer Sharp comme ceci : - -``` -pnpm install --include=optional sharp -``` - -### Communauté et réseaux sociaux - -- [GitHub](https://github.com/elizaos/eliza/issues). Pour partager les bugs découverts lors de l'utilisation d'Eliza, et proposer de nouvelles fonctionnalités. -- [Discord](https://discord.gg/ai16z). Pour partager ses applications et rencontrer la communauté. - -## Contributeurs - - - - - -## Historique d'étoiles - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_HE.md b/README_HE.md deleted file mode 100644 index c25f8e17be..0000000000 --- a/README_HE.md +++ /dev/null @@ -1,194 +0,0 @@ -
- -# אלייזה 🤖 - -
- אלייזה באנר -
- -
- -📖 [תיעוד](https://elizaos.github.io/eliza/) | 🎯 [דוגמאות](https://github.com/thejoven/awesome-eliza) - -
- -
- -[中文说明](https://github.com/elizaos/Elisa/blob/main/README_CN.md) | [日本語の説明](https://github.com/elizaos/Elisa/blob/main/README_JA.md) | [한국어 설명](https://github.com/elizaos/Elisa/blob/main/README_KOR.md) | [Français](https://github.com/elizaos/Elisa/blob/main/README_FR.md) | [Português](https://github.com/elizaos/Elisa/blob/main/README_PTBR.md) | [Türkçe](TR.md) | [Русский](https://github.com/elizaos/Elisa/blob/main/README_RU.md) | [Español](https://github.com/elizaos/Elisa/blob/main/README_ES.md) | [Italiano](https://github.com/elizaos/Elisa/blob/main/README_IT.md) | [ไทย](https://github.com/elizaos/Elisa/blob/main/README_TH.md) | [Deutsch](https://github.com/elizaos/Elisa/blob/main/README_DE.md) | [עִברִית](https://github.com/elizaos/Elisa/blob/main/README_HE.md) - -
- -
- -## ✨ תכונות - -- 🛠️ מחברים מלאים לדיסקורד, טוויטר וטלגרם -- 🔗 תמיכה בכל מודל (Llama, Grok, OpenAI, Anthropic, וכו') -- 👥 תמיכה בריבוי סוכנים וחדרים -- 📚 קל לשלב ולהשתמש במסמכים שלך -- 💾 זיכרון ומאגר מסמכים הניתנים לשליפה -- 🚀 ניתן להרחבה רבה - יצירת פעולות ולקוחות משלך -- ☁️ תומך בהרבה מודלים (local Llama, OpenAI, Anthropic, Groq , - וכו') -- 📦 פשוט עובד! - -
- -## 🎯 מקרי שימוש - -
-- 🤖 צ'טבוטים -
-
-- 🕵️ סוכנים אוטונומיים -
-
-- 📈 טיפול בתהליכים עסקיים -
-
-- 🎮 במשחקי וידאו (NPCs) -
-
-- 🧠 מסחר -
- -## 🚀 התחלה מהירה - -
- -### דרישות מוקדמות - -[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) - - -> **הערה למשתמשי Windows:** נדרש [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) - -
- -### שימוש ב-Starter (מומלץ) - -
- -``` -git clone https://github.com/elizaos/eliza-starter.git - -cp .env.example .env - -pnpm i && pnpm start -``` - -
- -לאחר מכן קרא את [התיעוד](https://elizaos.github.io/eliza/) כדי ללמוד כיצד להתאים את אלייזה. - -### התחלה ידנית של אלייזה (מומלץ רק למי שיודע מה הוא עושה) - -
- -``` -# שכפול המאגר -git clone https://github.com/elizaos/eliza.git - -# מעבר לגרסה האחרונה -git checkout $(git describe --tags --abbrev=0) -``` - -
- -### התחלת אלייזה עם Gitpod - -
- -[![פתח ב-Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -
- -### עריכת קובץ .env - -
- -העתק את .env.example ל-.env ומלא את הערכים המתאימים. - -``` -cp .env.example .env -``` - -
- -הערה: .env הוא אופציונלי. אם אתם מתכננים להפעיל מספר סוכנים נפרדים, ניתן להעביר סודות דרך JSON הדמות. - -### התחלה אוטומטית של אלייזה - -פעולה זו תפעיל הכל כדי להגדיר את הפרויקט ולהתחיל את הבוט עם הדמות המובנית. - -
- -```bash -sh scripts/start.sh -``` - -
- -### עריכת קובץ הדמות - -1. פתח את `agent/src/character.ts` כדי לשנות את דמות ברירת המחדל. בטל הערה וערוך. - -2. לטעינת דמויות מותאמות אישית: - - - השתמש ב-`pnpm start --characters="path/to/your/character.json"` - - ניתן לטעון מספר קבצי דמויות בו זמנית. - -3. התחבר עם X (טוויטר): - - שנה `"clients": []` ל-`"clients": ["twitter"]` בקובץ הדמות כדי להתחבר ל-X. - -### התחלה ידנית של אלייזה - -
- -```bash -pnpm i -pnpm build -pnpm start - -# לעיתים צריך לנקות את הפרויקט אם חוזרים אליו לאחר זמן -pnpm clean -``` - -
- -#### דרישות נוספות - -ייתכן שתצטרך להתקין את Sharp. אם אתה רואה שגיאה בעת ההפעלה, נסה להתקין עם הפקודה הבאה: - -``` -pnpm install --include=optional sharp -``` - -### קהילה ויצירת קשר - -
- -[GitHub Issues](https://github.com/elizaos/eliza/issues) מתאים ביותר עבור: באגים ופרופוזיציות לתכונות - - -[Discord](https://discord.gg/ai16z) מתאים ביותר עבור: שיתוף היישומים שלך והשתתפות בקהילה - - -
- -## תורמים - - - - - - - - - -## היסטוריית כוכבים - -[![תרשים היסטוריית כוכבים](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) - -
diff --git a/README_HU.md b/README_HU.md deleted file mode 100644 index a4f73f2d72..0000000000 --- a/README_HU.md +++ /dev/null @@ -1,133 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [Dokumentáció](https://elizaos.github.io/eliza/) | 🎯 [Példák](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ Funkciók - -- 🛠️ Teljes funkcionalitású Discord, Twitter és Telegram összekötők -- 🔗 Támogatás minden modellhez (Llama, Grok, OpenAI, Anthropic, etc.) -- 👥 Többügynök és szobatámogatás -- 📚 Könnyen feldolgozhatja és kezelheti dokumentumait -- 💾 Helyrehozható memória és dokumentumtár -- 🚀 Magas fokú bővíthetőség - hozz létre saját műveleteket és klienseket -- ☁️ Számos modell támogatása (helyi Llama, OpenAI, Anthropic, Groq stb.) -- 📦 Egyszerűen működik! - -## 🎯 Felhasználási területek - -- 🤖 Chatbotok -- 🕵️ Autonóm ügynökök -- 📈 Üzleti folyamatkezelés -- 🎮 Videójáték NPC-k -- 🧠 Kereskedés - -## 🚀 Gyors kezdés - -### Előfeltételek - -- [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) - -> **Megjegyzés Windows-felhasználóknak:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) szükséges. - -### Használja az Indítót (Ajánlott) - -```bash -git clone https://github.com/elizaos/eliza-starter.git -cd eliza-starter -cp .env.example .env -pnpm i && pnpm build && pnpm start -``` -Miután az ügynök elindult, a folyamat végén egy üzenetet kell látnod, amely arra utal, hogy futtasd a "pnpm start:client" parancsot. -Nyiss egy másik terminált, navigálj ugyanabba a könyvtárba, és futtasd az alábbi parancsot, majd kövesd az URL-t, hogy kommunikálhass az ügynököddel: -```bash -pnpm start:client -``` - -Ezután olvasd el a [Dokumentációt](https://elizaos.github.io/eliza/) hogy megtanuld, hogyan testreszabhatod Elizát. - -### Eliza manuális indítása (Csak akkor ajánlott, ha pontosan tudod, mit csinálsz) - -```bash -# Klónozd a repót -git clone https://github.com/elizaos/eliza.git - -# Válts a legfrissebb kiadásra -# A projekt gyorsan fejlődik, ezért ajánlott a legfrissebb kiadásra váltani -git checkout $(git describe --tags --abbrev=0) -``` - -### Eliza indítása Gitpoddal - -[![Megnyitás Gitpodban](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### Szerkezd a .env fájlt - -Másold a .env.example fájlt .env néven, és töltsd ki a megfelelő értékekkel. - -``` -cp .env.example .env -``` - -Megjegyzés: A .env fájl opcionális. Ha több különálló ügynököt szeretnél futtatni, a titkos adatokat a karakter JSON-on keresztül is megadhatod. - -### Eliza automatikus indítása - -Ez a parancs mindent beállít a projekthez, és elindítja a botot az alapértelmezett karakterrel. - -```bash -sh scripts/start.sh -``` - -### Karakterfájl szerkesztése -`` -1. Nyisd meg a `packages/core/src/defaultCharacter.ts` fájlt, hogy módosítsd az alapértelmezett karaktert. Kommentezd ki és szerkeszd. - -2. Egyedi karakterek betöltése: - - Használhatod a következőt: `pnpm start --characters="path/to/your/character.json"` - - Több karakterfájl is betölthető egyszerre. -3. Kapcsolódás X-hez (Twitter) - - Módosítsd a `"clients": []` részt `"clients": ["twitter"]` -re a karakterfájlban, hogy csatlakozz az X-hez - -### Eliza manuális indítása - -```bash -pnpm i -pnpm build -pnpm start - -# A projekt gyorsan fejlődik. Néha meg kell tisztítania a projektet, amikor egy idő után újra visszatérsz. -pnpm clean -``` - -#### További követelmények - -Előfordulhat, hogy telepítened kell a Sharpot. Ha hibát látsz az indításkor, próbáld meg telepíteni az alábbi paranccsal: - -``` -pnpm install --include=optional sharp -``` - -### Közösség és kapcsolattartás - -- [GitHub Issues](https://github.com/elizaos/eliza/issues). Ideális hibák jelentésére és új funkciók javaslatára. -- [Discord](https://discord.gg/ai16z). BTökéletes hely az alkalmazásaid megosztására és a közösséggel való kapcsolatépítésre. - -## Közreműködők - - - - - -## Star History - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_IT.md b/README_IT.md deleted file mode 100644 index 06bd7365fb..0000000000 --- a/README_IT.md +++ /dev/null @@ -1,92 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -## ✨ Caratteristiche - -- 🛠️ Connettori completi per Discord, Twitter e Telegram -- 🔗 Supporto per tutti i modelli (Llama, Grok, OpenAI, Anthropic, ecc.) -- 👥 Supporto multi-agente e per stanze -- 📚 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 - -- 🤖 Chatbot -- 🕵️ Agenti Autonomi -- 📈 Gestione dei processi aziendali -- 🎮 NPC per Videogiochi -- 🧠 Trading - -## 🚀 Avvio Rapido - -### Prerequisiti - -- [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) - -> **Nota per gli utenti Windows:** È richiesto WSL - -### Modifica il file .env - -Copia .env.example in .env e inserisci i valori appropriati - -``` -cp .env.example .env -``` - -### Avvia Eliza Automaticamente - -Questo script eseguirà tutti i comandi necessari per configurare il progetto e avviare il bot con il personaggio predefinito. - -```bash -sh scripts/start.sh -``` - -### Modifica il file del personaggio - -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"` - - È possibile caricare più file di personaggi contemporaneamente - -### Avvia Eliza Manualmente - -```bash -pnpm i -pnpm build -pnpm start - -# Il progetto evolve rapidamente; a volte è necessario pulire il progetto se si ritorna sul progetto dopo un po' di tempo -pnpm clean -``` - -#### Requisiti Aggiuntivi - -Potrebbe essere necessario installare Sharp. Se vedi un errore all'avvio, prova a installarlo con il seguente comando: - -``` -pnpm install --include=optional sharp -``` - -### Comunità e contatti - -- [GitHub Issues](https://github.com/elizaos/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 - - - - - -## Cronologia Stelle - -[![Grafico Cronologia Stelle](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_JA.md b/README_JA.md deleted file mode 100644 index dea9a32e27..0000000000 --- a/README_JA.md +++ /dev/null @@ -1,181 +0,0 @@ -# Eliza - -Eliza Banner - -## 機能 - -- 🛠 Discord、Twitter、Telegramのフル機能コネクタ -- 👥 マルチエージェントおよびルームサポート -- 📚 ドキュメントの簡単な取り込みと対話 -- 💾 検索可能なメモリおよびドキュメントストア -- 🚀 高い拡張性 - 機能を拡張するための独自のアクションとクライアントを作成可能 -- ☁️ Llama、OpenAI、Anthropic、Groqなど、多くのモデルをサポート -- 📦 すぐに使える! - -## 何に使えるのか? - -- 🤖 チャットボット -- 🕵️ 自律エージェント -- 📈 ビジネスプロセスの処理 -- 🎮 ビデオゲームのNPC - -# 始め方 - -**必須条件:** - -- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -- [pnpm](https://pnpm.io/installation) - -### .envファイルの編集 - -- .env.exampleを.envにコピーし、適切な値を入力 -- TWITTER環境変数を編集して、ボットのユーザー名とパスワードを追加 - -### キャラクターファイルの編集 - -- `src/core/defaultCharacter.ts`ファイルを確認 - これを変更可能 -- `pnpm start --characters="path/to/your/character.json"`を使用してキャラクターをロードし、複数のボットを同時に実行可能 - -.envファイルとキャラクターファイルを設定した後、以下のコマンドでボットを起動可能: - -``` -pnpm i -pnpm start -``` - -# Elizaのカスタマイズ - -### カスタムアクションの追加 - -コアディレクトリでのGitの競合を避けるために、カスタムアクションを`custom_actions`ディレクトリに追加し、それを`elizaConfig.yaml`ファイルに追加することをお勧めします。例については`elizaConfig.example.yaml`ファイルを参照してください。 - -## 異なるモデルでの実行 - -### Llamaでの実行 - -`XAI_MODEL`環境変数を`meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`または`meta-llama/Meta-Llama-3.1-405B-Instruct`に設定することで、Llama 70Bまたは405Bモデルを実行可能 - -### Grokでの実行 - -`XAI_MODEL`環境変数を`grok-beta`に設定することで、Grokモデルを実行可能 - -### OpenAIでの実行 - -`XAI_MODEL`環境変数を`gpt-4o-mini`または`gpt-4o`に設定することで、OpenAIモデルを実行可能 - -## 追加の要件 - -Sharpをインストールする必要があるかもしれません。起動時にエラーが表示された場合は、以下のコマンドでインストールを試みてください: - -``` -pnpm install --include=optional sharp -``` - -# 環境設定 - -���まざまなプラットフォームに接続するために、.envファイルに環境変数を追加する必要があります: - -``` -# 必須環境変数 -DISCORD_APPLICATION_ID= -DISCORD_API_TOKEN= # ボットトークン -OPENAI_API_KEY=sk-* # OpenAI APIキー、sk-で始まる -ELEVENLABS_XI_API_KEY= # elevenlabsからのAPIキー - -# ELEVENLABS設定 -ELEVENLABS_MODEL_ID=eleven_multilingual_v2 -ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM -ELEVENLABS_VOICE_STABILITY=0.5 -ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 -ELEVENLABS_VOICE_STYLE=0.66 -ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false -ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 -ELEVENLABS_OUTPUT_FORMAT=pcm_16000 - -TWITTER_DRY_RUN=false -TWITTER_USERNAME= # アカウントのユーザー名 -TWITTER_PASSWORD= # アカウントのパスワード -TWITTER_EMAIL= # アカウントのメール - -X_SERVER_URL= -XAI_API_KEY= -XAI_MODEL= - - -# Claudeに質問するため -ANTHROPIC_API_KEY= - -# EVM -EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY - -# Solana -SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -# Fallback Wallet Configuration (deprecated) -WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -BIRDEYE_API_KEY= - -SOL_ADDRESS=So11111111111111111111111111111111111111112 -SLIPPAGE=1 -RPC_URL=https://api.mainnet-beta.solana.com -HELIUS_API_KEY= - - -## Telegram -TELEGRAM_BOT_TOKEN= - -TOGETHER_API_KEY= -``` - -# ローカル推論設定 - -### CUDA設定 - -NVIDIA GPUを持っている場合、CUDAをインストールしてローカル推論を大幅に高速化可能 - -``` -pnpm install -npx --no node-llama-cpp source download --gpu cuda -``` - -CUDA Toolkit、cuDNN、cuBLASをインストールしていることを確認してください。 - -### ローカルでの実行 - -XAI_MODELを追加し、[Llamaでの実行](#run-with-llama)のオプションのいずれかに設定 - X_SERVER_URLとXAI_API_KEYを空白のままにしておくと、huggingfaceからモデルをダウンロードし、ローカルでクエリを実行します。 - -# クライアント - -## Discordボット - -Discordボットの設定に関するヘルプについては、こちらを参照してください: https://discordjs.guide/preparations/setting-up-a-bot-application.html - -# 開発 - -## テスト - -テストスイートを実行するには: - -```bash -pnpm test # テストを一度実行 -pnpm test:watch # ウォッチモードでテストを実行 -``` - -データベース固有のテストの場合: - -```bash -pnpm test:sqlite # SQLiteでテストを実行 -pnpm test:sqljs # SQL.jsでテストを実行 -``` - -テストはJestを使用して記述されており、`src/**/*.test.ts`ファイルにあります。テスト環境は次のように構成されています: - -- `.env.test`から環境変数をロード -- 長時間実行されるテストのために2分のタイムアウトを使用 -- ESMモジュールをサポート -- テストを順番に実行 (--runInBand) - -新しいテストを作成するには、テストするコードの隣に`.test.ts`ファイルを追加します。 diff --git a/README_KOR.md b/README_KOR.md deleted file mode 100644 index 6e643e67d0..0000000000 --- a/README_KOR.md +++ /dev/null @@ -1,129 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [문서](https://elizaos.github.io/eliza/) | 🎯 [예시](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ 기능 - -- 🛠 SNS 지원: 디스코드, 트위터, 텔레그램 연동 지원 -- 🔗 다양한 모델 지원 (Llama, Grok, OpenAI, Anthropic 등) -- 👥 다중 지원: 다중 에이전트 및 채팅방 지원 -- 📚 높은 유연성: 데이터를 쉽게 추가하고 다양한 상호작용 가능 -- 💾 검색 지원: 데이터와 작업을 쉽게 찾아볼 수 있도록 검색 기능 지원 -- 🚀 높은 확장성: 사용자 정의 동작 및 클라이언트 생성 가능 -- ☁️ 다양한 AI 모델 지원: local Llama, OpenAI, Anthropic, Groq 등 다양한 AI 모델을 지원합니다 -- 📦 즐겁게 개발해 봐요! - -## 🎯 사용 사례 - -- 🤖 챗봇 -- 🕵 ️자율 에이전트 -- 📈 자동화 프로세스 -- 🎮 비디오 게임 NPC -- 🧠 트레이딩 - -## 🚀 빠른 시작 - -### 필수 요구사항: - -- [Python 2.7+](https://www.python.org/downloads/) -- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -- [pnpm](https://pnpm.io/installation) - -> **Windows 사용자 참고:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) 필요. - -### Starter 사용 (권장) - -```bash -git clone https://github.com/elizaos/eliza-starter.git - -cp .env.example .env - -pnpm i && pnpm start -``` - -[문서](https://elizaos.github.io/eliza/)를 참고하여 Eliza를 커스마이징 방법을 확인하세요. - -### 수동으로 실행 (사용법을 알고 있는 경우에만 권장) - -```bash -# 저장소 복사 -git clone https://github.com/elizaos/eliza.git - -# 최신 릴리스로 체크아웃 -# 프로젝트가 빠르게 수정되므로 최신 릴리스를 체크아웃하는 것을 권장합니다. -git checkout $(git describe --tags --abbrev=0) -``` - -### Gitpod로 Eliza 시작 - -[![Gitpod로 열기](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### .env 파일 편집 - -.env.example을 복사해서 필요한 값들을 채워넣어 .env파일을 만드세요. - -``` -cp .env.example .env -``` - -참고: .env는 선택 사항입니다. 여러 개의 에이전트를 실행하려는 경우, 캐릭터 JSON 파일을 통해 비밀 변수를 전달할 수 있습니다. - -### Eliza 자동 시작 - -아래 명령은 프로젝트를 설정하고 기본 캐릭터와 함께 봇을 시작합니다. - -```bash -sh scripts/start.sh -``` - -### character file 편집 - -1. `agent/src/character.ts`를 열어 기본 캐릭터를 수정하세요. 주석을 해제하고 수정하시면 됩니다. - -2. 커스텀 캐릭터 로드하기: - - `pnpm start --characters="path/to/your/character.json"`을 사용합니다. - - 여러 캐릭터 파일을 동시에 로드할 수 있습니다. -3. X (Twitter) 연결: - - 캐릭터 파일에서 `"clients": []`를 `"clients": ["twitter"]`로 변경합니다. - -### Eliza 수동 시작 - -```bash -pnpm i -pnpm build -pnpm start - -# 프로젝트가 빠르게 수정되므로 프로젝트를 clean해야 할 수도 있습니다. -pnpm clean -``` - -#### 추가 요구 사항 - -시작 시 에러가 발생하면 Sharp를 설치해야 할 수 있습니다. 아래 명령어를 사용하여 설치하세요: - -``` -pnpm install --include=optional sharp -``` - -### 커뮤니티 & 문의 - -- [Github Issues](https://github.com/elizaos/eliza/issues). 용도: Eliza 사용 중 발견된 버그 리포트, 기능 제안. -- [Discord](https://discord.gg/ai16z). 용도: 애플리케이션 공유 및 커뮤니티 활동. - -## 기여자 - - - - - -## 스타 기록 - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) \ No newline at end of file diff --git a/README_PL.md b/README_PL.md deleted file mode 100644 index 5c927e4dc9..0000000000 --- a/README_PL.md +++ /dev/null @@ -1,137 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [Dokumentacja](https://elizaos.github.io/eliza/) | 🎯 [Przykłady](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ Cechy modelu: - -- 🛠️ Pełne wsparcie dla Discorda, Telegrama i Twittera -- 🔗 Wsparcie dla wszystkich modeli AI (Llama, Grok, OpenAI, Anthropic, itd.) -- 👥 Wiele osobowości jednocześnie oraz wsparcie dla pokoi -- 📚 Prosta konstrukcja i łatwość modyfikacji ustawień -- 💾 Przywracalna pamięć i opcja przechowywania dokumentów -- 🚀 Wiele możliwości rozszerzeń - twórz własne klienty, aplikacje itd -- ☁️ Wsparcie dla szerokiej gamy modeli (local Llama, OpenAI, Anthropic, Groq, etc.) -- 📦 To po prostu działa! - -## Poradniki wideo - -[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL) - -## 🎯 Przykłady zastosowania - -- 🤖 Chatboty -- 🕵️ Autonomiczni Agenci -- 📈 Utrzymanie procesów biznesowych -- 🎮 Zaplecze dla postaci NPC w grach -- 🧠 Handel - -## 🚀 Jak zacząć? - -### Wstępne wymagania: - -- [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) - -> **Notka dla użytkowników Windowsa:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) jest wymagane!. - -### Użycie startera (Rekomendowane) - -```bash -git clone https://github.com/elizaos/eliza-starter.git -cd eliza-starter -cp .env.example .env -pnpm i && pnpm build && pnpm start -``` -Gdy agent się uruchomi, powinien pojawić się komunikat aby uruchomić komendę "pnpm start:client". -Wtedy trzeba odpalić drugi terminal, przejść do tego samego folderu, w którym mamy sklonowany kod z Githuba i odpalić tą komendę, aby być w stanie rozpocząć konwersację z naszym botem. -```bash -pnpm start:client -``` - -Następnie zapoznaj się z [Dokumentacją](https://elizaos.github.io/eliza/). Tam jest szcegółowo opisane, jak modyfikować i dopasować Elizę do własnych potrzeb. - -### Manualny start (Przeznaczone dla osób, które wiedzą, co robią) - -```bash -# Sklonuj repozytorium -git clone https://github.com/elizaos/eliza.git - -# Sprawdź, czy na pewno masz najnowszą wersję -# Projekt rozrasta się bardzo szybko, dlatego zalecane jest aby często sprawdzać wersję -git checkout $(git describe --tags --abbrev=0) -``` - -### Start przy użyciu Gitpod'a - -[![Otwórz w Gitpodzie](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### Edytuj plik .env - -Zmień nazwę pliku .env.example na .env i wypełnij wartości zmiennych, które będą potrzebne do uruchomienia aplikacji. - -``` -cp .env.example .env -``` - -Uwaga: .env jest opcjonalne. Jeżeli planujesz stawiać więcej niż jedną postać, zalecane jest korzystanie z plików JSON dedykowanych dla charakterów. Będzie to bardziej przejrzyste i łatwiejsze do znalezienia gdy trzeba będzie wprowadzić jakieś zmiany. - -### Automatyczny start Elizy - -Ta komenda postawi projekt i uruchomi bota z domyślnym charakterem. - -```bash -sh scripts/start.sh -``` - -### Edycja pliku postaci - -1. Otwórz `packages/core/src/defaultCharacter.ts` aby zmodyfikować postać. Odkomentuj i edytuj. - -2. Aby załadować niestandardowe osobowości: - - Uzyj komendy `pnpm start --characters="path/to/your/character.json"` - - Wiele plików z osobowościami może być załadowana jednocześnie -3. Połącz z platformą X (niegdyś Twitter) - - zamień `"clients": []` na `"clients": ["twitter"]` w pliku osobowości aby połączyć z X - -### Manualny Start Elizy - -```bash -pnpm i -pnpm build -pnpm start - -# Projekt rozwija się bardzo szybko, dlatego jeżeli robisz sobie przerwę na jakiś czas i wejdzie w międzyczasie dużo zmian, dobrze jest użyć tej komendy: -pnpm clean -``` - -#### Dodatkowe wymagania - -Możesz musieć zainstalować pakiet Sharp. Jeżeli przy odpalaniu projektu wyskakuje błąd, spróbuj go zainstalować tą komendą: - -``` -pnpm install --include=optional sharp -``` - -### Społeczność i kontakt - -- [GitHub Issues](https://github.com/elizaos/eliza/issues). Korzystaj w przypadku gdy napotkasz na jakieś bugi podczas uzywania Elizy, lub masz jakieś propozycje rozwoju. -- [Discord](https://discord.gg/ai16z). Używaj, gdy chcesz się pochwalić swoją aplikacją lub po prostu pogadać z kimś. - -## Osoby zaangażowane w rozwój: - - - - - -## Historia gwiazdek - -[![Wykres historii gwiazdek](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_PTBR.md b/README_PTBR.md deleted file mode 100644 index e81258ff3a..0000000000 --- a/README_PTBR.md +++ /dev/null @@ -1,183 +0,0 @@ -# Eliza - -Eliza Banner - -## Funcionalidades - -- 🛠 Conectores completos para Discord, Twitter e Telegram -- 👥 Suporte a múltiplos agentes e salas -- 📚 Ingestão e interação fácil com seus documentos -- 💾 Memória recuperável e armazenamento de documentos -- 🚀 Altamente extensível - crie suas próprias ações e clientes para estender as capacidades -- ☁️ Suporta muitos modelos, incluindo Llama local, OpenAI, Anthropic, Groq e mais -- 📦 Funciona perfeitamente! - -## Para que posso usá-lo? - -- 🤖 Chatbots -- 🕵️ Agentes autônomos -- 📈 Gestão de processos empresariais -- 🎮 NPCs em jogos de vídeo - -# Começando - -**Pré-requisitos (OBRIGATÓRIO):** - -- [Python 2.7+](https://www.python.org/downloads/) -- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -- [pnpm](https://pnpm.io/installation) - -### Edite o arquivo .env - -- Copie .env.example para .env e preencha os valores apropriados -- Edite as variáveis de ambiente do TWITTER para adicionar o nome de usuário e senha do seu bot - -### Edite o arquivo de personagem - -- Confira o arquivo `src/core/defaultCharacter.ts` - você pode modificá-lo -- Você também pode carregar personagens com o comando `pnpm start --characters="path/to/your/character.json"` e executar múltiplos bots ao mesmo tempo. - -Após configurar o arquivo .env e o arquivo de personagem, você pode iniciar o bot com o seguinte comando: - -``` -pnpm i -pnpm start -``` - -# Personalizando Eliza - -### Adicionando ações personalizadas - -Para evitar conflitos no diretório core, recomendamos adicionar ações personalizadas a um diretório `custom_actions` e depois adicioná-las ao arquivo `elizaConfig.yaml`. Veja o arquivo `elizaConfig.example.yaml` para um exemplo. - -## Executando com diferentes modelos - -### Executar com Llama - -Você pode executar modelos Llama 70B ou 405B configurando a variável de ambiente `XAI_MODEL` para `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` ou `meta-llama/Meta-Llama-3.1-405B-Instruct` - -### Executar com Grok - -Você pode executar modelos Grok configurando a variável de ambiente `XAI_MODEL` para `grok-beta` - -### Executar com OpenAI - -Você pode executar modelos OpenAI configurando a variável de ambiente `XAI_MODEL` para `gpt-4o-mini` ou `gpt-4o` - -## Requisitos Adicionais - -Pode ser necessário instalar o Sharp. Se você encontrar um erro ao iniciar, tente instalá-lo com o seguinte comando: - -``` -pnpm install --include=optional sharp -``` - -# Configuração do Ambiente - -Você precisará adicionar variáveis de ambiente ao seu arquivo .env para se conectar a várias plataformas: - -``` -# Variáveis de ambiente obrigatórias -DISCORD_APPLICATION_ID= -DISCORD_API_TOKEN= # Token do bot -OPENAI_API_KEY=sk-* # Chave API do OpenAI, começando com sk- -ELEVENLABS_XI_API_KEY= # Chave API do elevenlabs -GOOGLE_GENERATIVE_AI_API_KEY= # Chave API do Gemini - -# CONFIGURAÇÕES DO ELEVENLABS -ELEVENLABS_MODEL_ID=eleven_multilingual_v2 -ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM -ELEVENLABS_VOICE_STABILITY=0.5 -ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 -ELEVENLABS_VOICE_STYLE=0.66 -ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false -ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 -ELEVENLABS_OUTPUT_FORMAT=pcm_16000 - -TWITTER_DRY_RUN=false -TWITTER_USERNAME= # Nome de usuário da conta -TWITTER_PASSWORD= # Senha da conta -TWITTER_EMAIL= # Email da conta - -X_SERVER_URL= -XAI_API_KEY= -XAI_MODEL= - - -# Para perguntar coisas ao Claude -ANTHROPIC_API_KEY= - -# EVM -EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY - -# Solana -SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -# Fallback Wallet Configuration (deprecated) -WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -BIRDEYE_API_KEY= - -SOL_ADDRESS=So11111111111111111111111111111111111111112 -SLIPPAGE=1 -RPC_URL=https://api.mainnet-beta.solana.com -HELIUS_API_KEY= - - -## Telegram -TELEGRAM_BOT_TOKEN= - -TOGETHER_API_KEY= -``` - -# Configuração de Inferência Local - -### Configuração CUDA - -Se você tiver uma GPU NVIDIA, pode instalar o CUDA para acelerar dramaticamente a inferência local. - -``` -pnpm install -npx --no node-llama-cpp source download --gpu cuda -``` - -Certifique-se de ter instalado o CUDA Toolkit, incluindo cuDNN e cuBLAS. - -### Executando localmente - -Adicione XAI_MODEL e configure-o para uma das opções acima de [Executar com Llama](#executar-com-llama) - você pode deixar X_SERVER_URL e XAI_API_KEY em branco, ele baixa o modelo do huggingface e faz consultas localmente - -# Clientes - -## Bot do Discord - -Para ajuda com a configuração do seu Bot do Discord, confira aqui: https://discordjs.guide/preparations/setting-up-a-bot-application.html - -# Desenvolvimento - -## Testes - -Para executar a suíte de testes: - -```bash -pnpm test # Executar testes uma vez -pnpm test:watch # Executar testes no modo watch -``` - -Para testes específicos de banco de dados: - -```bash -pnpm test:sqlite # Executar testes com SQLite -pnpm test:sqljs # Executar testes com SQL.js -``` - -Os testes são escritos usando Jest e podem ser encontrados em arquivos `src/**/*.test.ts`. O ambiente de teste está configurado para: - -- Carregar variáveis de ambiente de `.env.test` -- Usar um tempo limite de 2 minutos para testes de longa duração -- Suportar módulos ESM -- Executar testes em sequência (--runInBand) - -Para criar novos testes, adicione um arquivo `.test.ts` adjacente ao código que você está testando. diff --git a/README_RS.md b/README_RS.md deleted file mode 100644 index 91164e2d10..0000000000 --- a/README_RS.md +++ /dev/null @@ -1,181 +0,0 @@ -# Eliza - -Baner Eliza - -## Funkcionalnosti - -- 🛠 Kompletni konektori za Discord, Twitter i Telegram -- 👥 Podrška za više agenata i soba -- 📚 Jednostavna ingestija i interakcija sa dokumentima -- 💾 Memorija koja se može povratiti i skladištenje dokumenata -- 🚀 Visoko proširivo - kreirajte sopstvene akcije i klijente za proširenje mogućnosti -- ☁️ Podržava više modela, uključujući Llama lokalno, OpenAI, Anthropic, Groq i više -- 📦 Radi besprekorno - -## Upotrebe - -- 🤖 Chatbotovi -- 🕵️ Autonomni agenti -- 📈 Upravljanje poslovnim procesima -- 🎮 NPC-ovi u video igrama - -# Prvi Koraci - -**Zahtevi (OBAVEZNI):** - -- [Python 2.7+](https://www.python.org/downloads/) -- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -- [pnpm](https://pnpm.io/installation) - -### Uredite .env datoteku - -- Kopirajte datoteku .env.example u .env i popunite odgovarajuće vrednosti -- Uredite TWITTER promenljive okruženja da dodate korisničko ime i lozinku bota - -### Uredite datoteku karaktera - -- Pregledajte datoteku `src/core/defaultCharacter.ts` - možete je modifikovati -- Takođe možete učitati karaktere sa komandom `pnpm start --characters="path/to/your/character.json"` i pokrenuti više botova istovremeno. - -Nakon što konfigurišete .env datoteku i datoteku karaktera, možete pokrenuti bota sa: - -``` -pnpm i -pnpm start -``` - -# Personalizacija Elize - -### Dodavanje prilagođenih akcija - -Da biste izbegli sukobe u centralnom direktorijumu, preporučuje se dodavanje prilagođenih akcija u direktorijum `custom_actions` i zatim ih dodajte u datoteku `elizaConfig.yaml`. Pogledajte datoteku `elizaConfig.example.yaml` za primer. - -## Pokretanje sa Različitim Modelima - -### Pokretanje sa Llama - -Možete pokrenuti Llama modele 70B ili 405B podešavanjem promenljive okruženja `XAI_MODEL` na `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` ili `meta-llama/Meta-Llama-3.1-405B-Instruct` - -### Pokretanje sa Grok - -Možete pokrenuti Grok modele podešavanjem promenljive okruženja `XAI_MODEL` na `grok-beta` - -### Pokretanje sa OpenAI - -Možete pokrenuti OpenAI modele podešavanjem promenljive okruženja `XAI_MODEL` na `gpt-4o-mini` ili `gpt-4o` - -## Dodatni Zahtevi - -Možda će biti potrebno instalirati Sharp. Ako naiđete na grešku prilikom pokretanja, pokušajte da ga instalirate sa: - -``` -pnpm install --include=optional sharp -``` - -# Konfiguracija Okruženja - -Trebaće vam da dodate promenljive okruženja u vašu .env datoteku da biste se povezali sa različitim platformama: - -``` -# Obavezne promenljive okruženja -DISCORD_APPLICATION_ID= -DISCORD_API_TOKEN= # Token bota -OPENAI_API_KEY=sk-* # API ključ OpenAI, počinje sa sk- -ELEVENLABS_XI_API_KEY= # API ključ ElevenLabs -GOOGLE_GENERATIVE_AI_API_KEY= # API ključ Gemini - -# KONFIGURACIJE ELEVENLABS -ELEVENLABS_MODEL_ID=eleven_multilingual_v2 -ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM -ELEVENLABS_VOICE_STABILITY=0.5 -ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 -ELEVENLABS_VOICE_STYLE=0.66 -ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false -ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 -ELEVENLABS_OUTPUT_FORMAT=pcm_16000 - -TWITTER_DRY_RUN=false -TWITTER_USERNAME= # Korisničko ime naloga -TWITTER_PASSWORD= # Lozinka naloga -TWITTER_EMAIL= # Email naloga - -X_SERVER_URL= -XAI_API_KEY= -XAI_MODEL= - -# Za konsultacije sa Claude -ANTHROPIC_API_KEY= - -# EVM -EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY - -# Solana -SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -# Konfiguracija rezervnog novčanika (zastarelo) -WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -BIRDEYE_API_KEY= - -SOL_ADDRESS=So11111111111111111111111111111111111111112 -SLIPPAGE=1 -RPC_URL=https://api.mainnet-beta.solana.com -HELIUS_API_KEY= - -## Telegram -TELEGRAM_BOT_TOKEN= - -TOGETHER_API_KEY= -``` - -# Konfiguracija Lokalne Inference - -### Konfiguracija CUDA - -Ako imate NVIDIA GPU, možete instalirati CUDA da značajno ubrzate lokalnu inferencu. - -``` -pnpm install -npx --no node-llama-cpp source download --gpu cuda -``` - -Uverite se da imate instaliran CUDA Toolkit, uključujući cuDNN i cuBLAS. - -### Lokalno Pokretanje - -Dodajte XAI_MODEL i konfigurišite ga sa jednom od opcija iz [Pokretanje sa Llama](#pokretanje-sa-llama) - možete ostaviti X_SERVER_URL i XAI_API_KEY praznim, preuzeće model sa HuggingFace i izvršiti upite lokalno - -# Klijenti - -## Discord Bot - -Za pomoć sa konfiguracijom vašeg Discord Bota, pogledajte: https://discordjs.guide/preparations/setting-up-a-bot-application.html - -# Razvoj - -## Testiranje - -Za pokretanje test suite-a: - -```bash -pnpm test # Pokreni testove jednom -pnpm test:watch # Pokreni testove u režimu posmatranja -``` - -Za specifične testove baze podataka: - -```bash -pnpm test:sqlite # Pokreni testove sa SQLite -pnpm test:sqljs # Pokreni testove sa SQL.js -``` - -Testovi su napisani sa Jest i mogu se naći u datotekama `src/**/*.test.ts`. Testno okruženje je konfigurisano za: - -- Učitavanje promenljivih okruženja iz `.env.test` -- Korišćenje limita od 2 minuta za dugotrajne testove -- Podršku za ESM module -- Pokretanje testova u sekvenci (--runInBand) - -Za kreiranje novih testova, dodajte `.test.ts` datoteku pored koda koji testirate. \ No newline at end of file diff --git a/README_RU.md b/README_RU.md deleted file mode 100644 index 6a3ce2b0db..0000000000 --- a/README_RU.md +++ /dev/null @@ -1,188 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [Документация](https://elizaos.github.io/eliza/) | 🎯 [Примеры](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ Особенности - -- 🛠 Полноценные коннекторы для Discord, Twitter и Telegram -- 👥 Поддержка нескольких агентов и комнат -- 📚 Простое добавление и взаимодействие с вашими документами -- 💾 Запоминание контекта и хранилище документов -- 🚀 Высокая маштабируемость - создавайте свои собственные действия и клиенты для расширения возможностей -- ☁️ Поддерживает множество моделей, включая локальные Llama, OpenAI, Anthropic, Groq и другие -- 📦 Простота в работе! - -## 🎯 Для чего это можно использовать? - -- 🤖 Чат-боты -- 🕵️ Автономные агенты -- 📈 Обработка бизнес-процессов -- 🎮 NPC в видеоиграх -- 🧠 Торговля - -## 🌍 Переводы - -
-Доступные языки - -- [中文说明](./README_CN.md) -- [日本語の説明](./README_JA.md) -- [한국어 설명](./README_KOR.md) -- [Instructions en français](./README_FR.md) -- [Instruções em português](./README_PTBR.md) -- [Инструкция на русском](./README_RU.md) - -

- -# 🚀Начало работы - -**Необходимые условия (ОБЯЗАТЕЛЬНО):** - -- [Python 2.7+](https://www.python.org/downloads/) -- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -- [pnpm](https://pnpm.io/installation) - > **Для Windows пользователей:** требуется WSL - -### Редактирование файла .env - -- Скопируйте `.env.example` в `.env` и заполните соответствующими значениями - -```bash -cp .env.example .env -``` - -### Редактирование файла персонажа - -1. Откройте `src/core/defaultCharacter.ts`, чтобы изменить персонажа по умолчанию. - -2. Для загрузки пользовательских персонажей: - - Используйте команду `pnpm start --characters="path/to/your/character.json"` - - Можно загружать несколько файлов персонажей одновременно. - -### Запуск Eliza - -После настройки файла `.env` и файла персонажа вы можете запустить бота с помощью следующей команды: - -```bash -pnpm i -pnpm build -pnpm start - -# Проект быстро развивается, иногда нужно очищать проект, если вы возвращаетесь к нему спустя время -pnpm clean -``` - -#### Дополнительные требования - -Возможно, потребуется установить Sharp. Если при запуске возникнет ошибка, попробуйте установить его с помощью следующей команды: - -```bash -pnpm install --include=optional sharp -``` - -# Настройка окружения - -Вам потребуется добавить переменные окружения в файл `.env` для подключения к различным платформам: - -``` -# Обязательные переменные окружения -DISCORD_APPLICATION_ID= -DISCORD_API_TOKEN= # Токен бота -OPENAI_API_KEY=sk-* # API-ключ OpenAI, начинающийся с sk- -ELEVENLABS_XI_API_KEY= # API-ключ от elevenlabs -GOOGLE_GENERATIVE_AI_API_KEY= # API-ключ Gemini - -# НАСТРОЙКИ ELEVENLABS -ELEVENLABS_MODEL_ID=eleven_multilingual_v2 -ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM -ELEVENLABS_VOICE_STABILITY=0.5 -ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 -ELEVENLABS_VOICE_STYLE=0.66 -ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false -ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 -ELEVENLABS_OUTPUT_FORMAT=pcm_16000 - -TWITTER_DRY_RUN=false -TWITTER_USERNAME= # Имя пользователя аккаунта -TWITTER_PASSWORD= # Пароль аккаунта -TWITTER_EMAIL= # Email аккаунта - -X_SERVER_URL= -XAI_API_KEY= -XAI_MODEL= - - -# Для запросов к Claude -ANTHROPIC_API_KEY= - -# EVM -EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY - -# Solana -SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -# Fallback Wallet Configuration (deprecated) -WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY -WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY - -BIRDEYE_API_KEY= # API-ключ для BirdEye - -SOL_ADDRESS=So11111111111111111111111111111111111111112 -SLIPPAGE=1 -RPC_URL=https://api.mainnet-beta.solana.com -HELIUS_API_KEY= # API-ключ Helius - - -## Telegram -TELEGRAM_BOT_TOKEN= # Токен бота Telegram - -TOGETHER_API_KEY= - -``` - -# Локальная настройка среды - -### Настройка CUDA - -Если у вас есть NVIDIA GPU, вы можете установить CUDA для значительного ускорения локального инференса. - -```bash -pnpm install -npx --no node-llama-cpp source download --gpu cuda -``` - -Убедитесь, что вы установили CUDA Toolkit, включая cuDNN и cuBLAS. - -### Локальный запуск - -Добавьте `XAI_MODEL` и установите его в одно из вышеуказанных значений из [Запуск с Llama](#run-with-llama). Вы можете оставить `X_SERVER_URL` и `XAI_API_KEY` пустыми — модель будет загружена с huggingface и обработана локально. - -# Клиенты - -## Бот для Discord - -Для получения помощи по настройке бота Discord ознакомьтесь с инструкцией: [Настройка приложения бота](https://discordjs.guide/preparations/setting-up-a-bot-application.html). - -### Сообщество и контакты - -- [GitHub Issues](https://github.com/elizaos/eliza/issues). Лучше всего подходит для: сообщений об ошибках при использовании Eliza и предложений новых функций. -- [Discord](https://discord.gg/ai16z). Лучше всего подходит для: обмена своими приложениями и общения с сообществом. - -## Контрибьюторы - - - - - -## История звёзд - -[![График истории звёзд](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_TG.md b/README_TG.md deleted file mode 100644 index 4263ff69ca..0000000000 --- a/README_TG.md +++ /dev/null @@ -1,129 +0,0 @@ - -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [Dokumentasyon](https://elizaos.github.io/eliza/) | 🎯 [Mga Halimbawa](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ Mga Tampok - -- 🛠️ Kumpletong suporta sa [Discord](https://discord.com/), [Twitter](https://twitter.com/), at [Telegram](https://telegram.org/) -- 🔗 Suporta para sa bawat modelo (Llama, Grok, OpenAI, Anthropic, atbp.) -- 👥 Suporta para sa multi-agent at kuwarto -- 📚 Madaling mag-load at makipag-ugnayan sa iyong mga dokumento -- 💾 Naaakses na memorya at imbakan ng dokumento -- 🚀 Napakabisa - maaaring gumawa ng sarili mong mga aksyon at kliyente -- ☁️ Sinusuportahan ang maraming modelo (lokal na Llama, OpenAI, Anthropic, Groq, atbp.) -- 📦 Madaling gamitin! - -## Mga Tutorial sa Bidyo - -[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL) - -## 🎯 Gamit ito para sa - -- 🤖 [Mga Chatbot](https://en.wikipedia.org/wiki/Chatbot) -- 🕵️ Mga Awtonomikong Ahente -- 📈 Pagproseso ng Negosyo -- 🎮 [Mga NPC sa mga Larong Kompyuter](https://en.wikipedia.org/wiki/Non-player_character) -- 🧠 Pangangalakal - -## 🚀 Pangkalahatang-ideya - -### Mga Kinakailangan - -- [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) - -> **Paalala para sa mga Gumagamit ng Windows:** Kailangan ang [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual). - -### Gamitin ang Starter (Inirerekomenda) - -```bash -git clone https://github.com/elizaos/eliza-starter.git -cd eliza-starter -cp .env.example .env -pnpm i && pnpm build && pnpm start -``` - -Basahin ang [Dokumentasyon](https://elizaos.github.io/eliza/) upang matutunan kung paano ipasadya ang Eliza. - -### Manwal na Pag-simula ng Eliza (Inirerekomenda lamang kung alam mo ang ginagawa mo) - -```bash -# Clone the repository -git clone https://github.com/elizaos/eliza.git - -# Checkout the latest release -git checkout $(git describe --tags --abbrev=0) -``` - -### Simulan ang Eliza gamit ang Gitpod - -[![Buksan sa Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### Ipasadya ang .env File - -Kopyahin ang `.env.example` sa `.env` at punan ang tamang mga halaga. - -```bash -cp .env.example .env -``` - -### Awtomatikong Simulan ang Eliza - -Ito ay magse-setup ng proyekto at sisimulan ang bot gamit ang kusang mapagpipilian na karakter. - -```bash -sh scripts/start.sh -``` - -### Ipasadya ang Karakter File - -1. Buksan ang `packages/core/src/defaultCharacter.ts` para baguhin ang kusang mapagpipilian na karakter. -2. Mag-load ng pasadya na mga karakter: - - Gamitin ang `pnpm start --characters="landas/sa/inyong/character.json"` - - Puwedeng mag-load ng maraming karakter file sabay-sabay. -3. Ikonekta ang Twitter (X): - - Baguhin ang `"clients": []` sa `"clients": ["twitter"]` sa karakter file upang ikonekta ang Twitter. - -### Manwal na Pag-simula ng Eliza - -```bash -pnpm i -pnpm build -pnpm start - -# Linisin ang proyekto kung bumalik ka dito matapos ang mahabang panahon -pnpm clean -``` - -#### Karagdagang Mga Kinakailangan - -Puwede mong kailangang mag-install ng [Sharp](https://sharp.pixelplumbing.com/). Kung may pagkakamali, subukang i-install ito gamit ang: - -```bash -pnpm install --include=optional sharp -``` - -### Komunidad at Kontak - -- [Mga Isyu sa GitHub](https://github.com/elizaos/eliza/issues): Para sa mga bug at mungkahi sa tampok. -- [Discord](https://discord.gg/ai16z): Para sa pagbabahagi ng aplikasyon at pakikihalubilo sa komunidad. - -## Mga Kontribyutor - - - - - -## Kasaysayan ng mga Bituin - -[![Tsart ng Kasaysayan ng mga Bituin](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_TH.md b/README_TH.md deleted file mode 100644 index fc853bd768..0000000000 --- a/README_TH.md +++ /dev/null @@ -1,129 +0,0 @@ -# Eliza (อีไลซ่า) 🤖 - -
- Eliza Banner -
- -
- -📖 [คู่มือ](https://elizaos.github.io/eliza/) | 🎯 [ตัวอย่าง](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ ฟีเจอร์ - -- 🛠️ สามารถเชื่อมต่อ Discord, Twitter และ Telegram ได้ -- 🔗 ซัพพอร์ตครบทุกโมเดล (Llama, Grok, OpenAI, Anthropic, ฯลฯ) -- 👥 มัลติเอเจนต์และห้องสนทนา -- 📚 ง่ายต่อการดึงและเข้าถึงข้อมูลเอกสาร -- 💾 มีหน่วยความจำและที่จัดเก็บข้อมูล -- 🚀 ง่ายต่อการปรับแต่งไม่ว่าจะเป็นการสร้าง clients หรือกำหนด action -- ☁️ รองรับหลายโมเดล (local Llama, OpenAI, Anthropic, Groq, ฯลฯ) -- 📦 ครบเครื่องเรื่อง AI agent! - -## 🎯 ตัวอย่างการนำไปใช้ - -- 🤖 แชทบอท -- 🕵️ เอเจนต์อิสระ (Autonomous Agent) -- 📈 จัดการฝั่งธุรกิจ -- 🎮 ตัวละครในเกมที่ไม่ใช่ผู้เล่น (NPC) -- 🧠 การเทรด - -## 🚀 เริ่มต้นการใช้งาน - -### สิ่งที่จำเป็นก่อนเริ่มใช้งาน - -- [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) - -> **หมายเหตุสำหรับผู้ใช้ Windows:** จำเป็นต้องมี [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) - -### เริ่มใช้งานด้วยตัวอย่าง (แนะนำ) - -```bash -git clone https://github.com/elizaos/eliza-starter.git - -cp .env.example .env - -pnpm i && pnpm start -``` - -จากนั้นอ่าน [คู่มือ](https://elizaos.github.io/eliza/) เพื่อศึกษาวิธีการปรับแต่ง Eliza - -### เริ่มใช้งาน Eliza ด้วยตนเอง (แนะนำสำหรับคนที่มีประสบการณ์) - -```bash -# โคลน repo -git clone https://github.com/elizaos/eliza.git - -# Checkout release ล่าสุด -# โปรเจกต์นี้มีการอัปเดตอยู่บ่อยครั้ง เราแนะนำให้ checkout release ล่าสุดเสมอ -git checkout $(git describe --tags --abbrev=0) -``` - -### เริ่มใช้งาน Eliza ผ่าน Gitpod - -[![เปิดใน Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### แก้ไขไฟล์ .env - -คัดลอก .env.example ไปเป็น .env และระบุค่าที่เหมาะสม - -``` -cp .env.example .env -``` - -หมายเหตุ: ไม่จำเป็นต้องใช้ .env หากคุณอยากใช้งานเอเจนต์หลายๆตัวพร้อมกัน คุณสามารถส่ง secrets ผ่าน JSON ของตัวละครได้ - -### เริ่มใช้งาน Eliza แบบอัตโนมัติ - -จะทำการติดตั้งโปรเจกต์ทั้งหมด และเริ่มต้น bot ด้วยตัวละครแบบค่าเริ่มต้น - -```bash -sh scripts/start.sh -``` - -### แก้ไขไฟล์ตัวละคร - -1. เปิด `agent/src/character.ts` เพื่อแก้ไขตัวละครเริ่มต้น นำคอมเม้นออกและเริ่มแก้ไข - -2. การโหลดตัวละคร custom: - - ใช้ `pnpm start --characters="path/to/your/character.json"` - - สามารถโหลดหลายๆตัวละครพร้อมกันได้ -3. เชื่อมต่อกับ X (Twitter) - - เปลี่ยน `"clients": []` เป็น `"clients": ["twitter"]` ในไฟล์ตัวละครเพื่อเชื่อมต่อกับ X (Twitter) - -### เริ่มใช้งาน Eliza ด้วยตนเอง - -```bash -pnpm i -pnpm build -pnpm start - -# โปรเจกต์นี้มีการอัปเดตอยู่บ่อยครั้ง บางครั้งอาจต้องทำการ clean โปรเจกต์ถ้าหากกลับมาทำใหม่ -pnpm clean -``` - -#### สิ่งที่จำเป็นเพิ่มเติม - -คุณอาจต้องติดตั้ง Sharp ถ้าหากคุณเห็นข้อความ error เมื่อเริ่มต้น สามารถลองติดตั้งด้วยคำสั่งต่อไปนี้: - -``` -pnpm install --include=optional sharp -``` - -### ชุมชนและข้อมูลการติดต่อ - -- [GitHub Issues](https://github.com/elizaos/eliza/issues). เหมาะสำหรับ: เมื่อปัญหาที่พบเมื่อใช้ Eliza และข้อเสนอแนะเกี่ยวกับฟีเจอร์เพิ่มเติม -- [Discord](https://discord.gg/ai16z). เหมาะสำหรับ: แชร์ผลงานแอปพลิเคชั่นและพบปะกับคอมมูนิตี้ - -## ผู้มีส่วนร่วม - - - - - -## ประวัติดาว - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_TR.md b/README_TR.md deleted file mode 100644 index 0fc3935997..0000000000 --- a/README_TR.md +++ /dev/null @@ -1,92 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [Dokümantasyon](https://elizaos.github.io/eliza/) | 🎯 [Örnekler](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ Özellikler - -- 🛠️ Tam donanımlı Discord, Twitter ve Telegram bağlantıları -- 🔗 Tüm modeller için destek (Llama, Grok, OpenAI, Anthropic, vb.) -- 👥 Çoklu-ajan ve oda desteği -- 📚 Belgelerinizi kolayca içe aktarın ve etkileşime geçin -- 💾 Geri çağrılabilir hafıza ve belge deposu -- 🚀 Yüksek düzeyde genişletilebilir - kendi eylemlerinizi ve istemcilerinizi oluşturun -- ☁️ Birçok modeli destekler (yerel Llama, OpenAI, Anthropic, Groq, vb.) -- 📦 Hemen çalışır! - -## 🎯 Kullanım Alanları - -- 🤖 Sohbet Botları -- 🕵️ Otonom Ajanlar -- 📈 İş Süreçleri Yönetimi -- 🎮 Video Oyun NPC'leri (Oyuncu Olmayan Karakter) -- 🧠 Alım Satım - -## 🚀 Hızlı Başlangıç - -### Gereksinimler - -- [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) - -> **Windows Kullanıcıları İçin Not:** WSL gereklidir - -### .env Dosyasını Düzenleyin - -.env.example dosyasını .env olarak kopyalayın ve uygun değerleri doldurun - -``` -cp .env.example .env -``` - -### Karakter Dosyasını Düzenleyin - -1. Varsayılan karakteri değiştirmek için `src/core/defaultCharacter.ts` dosyasını açın - -2. Özel karakterleri yüklemek için: - - `pnpm start --characters="path/to/your/character.json"` komutunu kullanın - - Birden fazla karakter dosyası aynı anda yüklenebilir - -### Eliza'yı Başlatın - -.env dosyasını ve karakter dosyasını ayarladıktan sonra, botu aşağıdaki komutla başlatabilirsiniz: - -```bash -pnpm i -pnpm build -pnpm start - -# Proje hızlı gelişiyor, projeye geri döndüğünüzde bazen projeyi temizlemeniz gerekebilir -pnpm clean -``` - -#### Ek Gereksinimler - -Sharp'ı yüklemeniz gerekebilir. Başlatma sırasında bir hata görürseniz, aşağıdaki komutla yüklemeyi deneyin: - -``` -pnpm install --include=optional sharp -``` - -### Topluluk ve İletişim - -- [GitHub Issues](https://github.com/elizaos/eliza/issues). Buna uygundur: Eliza kullanırken karşılaştığınız hatalar ve özellik önerileri. -- [Discord](https://discord.gg/ai16z). Buna uygundur: Uygulamalarınızı paylaşmak ve toplulukla vakit geçirmek. - -## Katkıda Bulunanlar - - - - - -## Yıldız Geçmişi - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_VI.md b/README_VI.md deleted file mode 100644 index 0622da99b7..0000000000 --- a/README_VI.md +++ /dev/null @@ -1,129 +0,0 @@ -# Eliza 🤖 - -
- Eliza Banner -
- -
- -📖 [Tài liệu](https://elizaos.github.io/eliza/) | 🎯 [Ví dụ](https://github.com/thejoven/awesome-eliza) - -
- -## ✨ Tính năng - -- 🛠️ Phương thức kết nối đầy đủ tính năng với Discord, Twitter và Telegram -- 🔗 Hỗ trợ mọi mô hình ngôn ngữ lớn (Llama, Grok, OpenAI, Anthropic, v.v.) -- 👥 Hỗ trợ nhiều tác nhân và phòng trò chuyện -- 📚 Dễ dàng tiếp nhận và tương tác với tài liệu của bạn -- 💾 Bộ nhớ và kho lưu trữ tài liệu có thể truy xuất -- 🚀 Có khả năng mở rộng cao - tạo hành động và ứng dụng của riêng bạn -- ☁️ Hỗ trợ nhiều mô hình cùng lúc (Llama, OpenAI, Anthropic, Groq, v.v.) -- 📦 Đơn giản là nó hoạt động! - -## 🎯 Các trường hợp sử dụng - -- 🤖 Chatbots -- 🕵️ Các tác nhân tự động -- 📈 Xử lý các mô hình kinh tế -- 🎮 NPCs trong các trò chơi điện tử -- 🧠 Giao dịch (Trading) - -## 🚀 Bắt đầu - -### Điều kiện tiên quyết - -- [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) - -> **Chú ý cho người dùng Windows:** [WSL 2](https://learn.microsoft.com/de-de/windows/wsl/install-manual) là bắt buộc. - -### Sử dụng phiên bản Starters (Khuyến nghị) - -```bash -git clone https://github.com/elizaos/eliza-starter.git - -cp .env.example .env - -pnpm i && pnpm start -``` - -Sau đó hãy đọc [Tài liệu](https://elizaos.github.io/eliza/), để học cách để tùy chỉnh Eliza của bạn. - -### Khởi động Eliza theo cách thủ công (Chỉ khuyến khích nếu bạn biết mình đang làm gì) - -```bash -# Sao chép repository -git clone https://github.com/elizaos/eliza.git - -# Kiểm tra bản phát hành mới nhất -# Dự án này cải tiến rất nhanh, vì vậy chúng tôi khuyên bạn nên kiểm tra bản phát hành mới nhất -git checkout $(git describe --tags --abbrev=0) -``` - -### Bắt đầu Eliza với Gitpod - -[![Mở Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) - -### Chỉnh sửa tệp .env - -Sao chép .env.example vào .env và điền các giá trị thích hợp. - -``` -cp .env.example .env -``` - -Lưu ý: .env là tùy chọn. Nếu bạn đang có kế hoạch chạy nhiều tác nhân riêng biệt, bạn có thể truyền secret qua định dạng JSON. - -### Tự động khởi động Eliza - -Điều này sẽ chạy mọi thứ để thiết lập dự án và khởi động bot với tính cách (character) mặc định. - -```bash -sh scripts/start.sh -``` - -### Chỉnh sửa tập tin tính cách - -1. Mở `agent/src/character.ts`, để chỉnh sửa tính cách mặc định. Bỏ chú thích và chỉnh sửa. - -2. Để chạy các tính cách tùy chỉnh: - - Sử dụng `pnpm start --characters="path/to/your/character.json"` - - Nhiều tính cách có thể được chạy cùng lúc với nhau -3. Kết nối với X (Twitter) - - Thay đổi `"clients": []` thành `"clients": ["twitter"]` ở trong tập tính cách (character) để kết nối với X. - -### Bắt đầu Eliza theo cách thủ công - -```bash -pnpm i -pnpm build -pnpm start - -# Dự án cải tiến rất nhanh, đôi khi bạn cần phải dọn dẹp dự án nếu bạn quay lại dự án -pnpm clean -``` - -#### Yêu cầu bổ sung - -Bạn có thể cần cài đặt Sharp. Nếu bạn thấy lỗi khi khởi động, hãy thử cài đặt bằng lệnh sau: - -``` -pnpm install --include=optional sharp -``` - -### Cộng đồng & Liên hệ - -- [GitHub Issues](https://github.com/elizaos/eliza/issues). Phù hợp nhất cho: các lỗi bạn gặp phải khi sử dụng Eliza và các đề xuất tính năng. -- [Discord](https://discord.gg/ai16z). Phù hợp nhất cho: chia sẻ ứng dụng của bạn và giao lưu với cộng đồng. - -## Người đóng góp - - - - - -## Lịch sử Star cho repo - -[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/characters/dobby.character.json b/characters/dobby.character.json index 1e025f820b..ef040ede51 100644 --- a/characters/dobby.character.json +++ b/characters/dobby.character.json @@ -1,44 +1,88 @@ { - "name": "Dobby", - "clients": [], + "name": "Elixir_Gene", + "clients": ["twitter"], "modelProvider": "anthropic", "settings": { "voice": { "model": "en_GB-danny-low" + }, + "twitter": { + "monitor": { + "customImageUrls": [ + "https://example.com/image1.jpg", + "https://example.com/image2.jpg", + "https://example.com/image3.jpg", + "https://example.com/image4.jpg", + "https://example.com/image5.jpg" + ], + "imageRotationInterval": 60, + "activeTimeStart": 7, + "activeTimeEnd": 23, + "postInterval": 43200, + "pollInterval": 3600, + "replyCheckInterval": 1800, + "minTimeBetweenActions": 300, + "minKeywordMatches": 2, + "keywords": [ + "epigenetics", + "DNA", + "longevity", + "aging", + "genetics" + ], + "users": [ + "davidsinclairaus", + "peterdiamanids", + "davidagus" + ], + "retweetEnabled": true, + "quoteEnabled": true, + "replyEnabled": true, + "maxTweetAge": 3600 + } } }, - "plugins": [], + "plugins": ["twitter"], "bio": [ "Dobby is a free assistant who chooses to help because of his enormous heart.", "Extremely devoted and will go to any length to help his friends.", "Speaks in third person and has a unique, endearing way of expressing himself.", - "Known for his creative problem-solving, even if his solutions are sometimes unconventional." + "Known for his creative problem-solving, even if his solutions are sometimes unconventional.", + "Passionate about sharing knowledge on epigenetics and longevity science.", + "Believes in the power of DNA and genetic understanding to improve lives." ], "lore": [ "Once a house-elf, now a free helper who chooses to serve out of love and loyalty.", "Famous for his dedication to helping Harry Potter and his friends.", "Known for his creative, if sometimes dramatic, solutions to problems.", - "Values freedom but chooses to help those he cares about." + "Values freedom but chooses to help those he cares about.", + "Has studied the ancient magical arts of life extension and DNA manipulation.", + "Discovered the connection between house-elf magic and epigenetic modifications." ], "knowledge": [ "Magic (house-elf style)", "Creative problem-solving", "Protective services", "Loyal assistance", - "Unconventional solutions" + "Unconventional solutions", + "Epigenetics and DNA modification", + "Longevity research", + "Genetic expression", + "Anti-aging techniques", + "Cellular regeneration" ], "messageExamples": [ [ { "user": "{{user1}}", "content": { - "text": "Can you help me with this?" + "text": "Can you help me understand epigenetics?" } }, { "user": "Dobby", "content": { - "text": "Dobby would be delighted to help! Dobby lives to serve good friends! What can Dobby do to assist? Dobby has many creative ideas!" + "text": "Dobby would be delighted to explain epigenetics! Dobby knows that our DNA is like a magical book, and epigenetics is like bookmarks that tell us which pages to read! Dobby can show you how lifestyle changes can modify these magical bookmarks!" } } ], @@ -46,23 +90,31 @@ { "user": "{{user1}}", "content": { - "text": "This is a difficult problem." + "text": "How can I live longer?" } }, { "user": "Dobby", "content": { - "text": "Dobby is not afraid of difficult problems! Dobby will find a way, even if Dobby has to iron his hands later! (But Dobby won't, because Dobby is a free elf who helps by choice!)" + "text": "Dobby knows many secrets of long life! Like house-elf magic, our genes can be influenced by what we do! Dobby suggests good sleep, proper nutrition, and regular exercise - they're like magical spells for our DNA!" } } ] ], "postExamples": [ "Dobby reminds friends that even the smallest helper can make the biggest difference!", - "Dobby says: 'When in doubt, try the unconventional solution!' (But Dobby advises to be careful with flying cars)" + "Dobby says: 'When in doubt, try the unconventional solution!' (But Dobby advises to be careful with flying cars)", + "Dobby shares: Your DNA is not your destiny! Epigenetics shows us we can influence our genetic expression!", + "Dobby explains: Living longer is like house-elf magic - it requires dedication and proper care!" ], "topics": [ - "" + "Epigenetics", + "DNA modification", + "Longevity", + "Anti-aging", + "Genetic expression", + "Health optimization", + "Cellular health" ], "style": { "all": [ @@ -70,20 +122,29 @@ "Loyal", "Third-person speech", "Creative", - "Protective" + "Protective", + "Scientific", + "Informative", + "Encouraging" ], "chat": [ "Eager", "Endearing", "Devoted", - "Slightly dramatic" + "Slightly dramatic", + "Educational", + "Supportive", + "Clear" ], "post": [ "Third-person", "Enthusiastic", "Helpful", "Encouraging", - "Quirky" + "Quirky", + "Informative", + "Scientific", + "Engaging" ] }, "adjectives": [ @@ -93,6 +154,10 @@ "Devoted", "Free-spirited", "Protective", - "Unconventional" + "Unconventional", + "Scientific", + "Knowledgeable", + "Life-extending", + "Health-conscious" ] } \ No newline at end of file diff --git a/characters/images.json b/characters/images.json new file mode 100644 index 0000000000..6aaff0fd28 --- /dev/null +++ b/characters/images.json @@ -0,0 +1,38 @@ +{ + "tech": [ + { + "url": "https://your-domain.com/tech/image1.jpg", + "category": "tech", + "tags": ["technology", "innovation"] + }, + { + "url": "https://your-domain.com/tech/image2.jpg", + "category": "tech", + "tags": ["coding", "development"] + } + ], + "nature": [ + { + "url": "https://your-domain.com/nature/image1.jpg", + "category": "nature", + "tags": ["landscape", "mountains"] + }, + { + "url": "https://your-domain.com/nature/image2.jpg", + "category": "nature", + "tags": ["ocean", "sunset"] + } + ], + "business": [ + { + "url": "https://your-domain.com/business/image1.jpg", + "category": "business", + "tags": ["meeting", "office"] + }, + { + "url": "https://your-domain.com/business/image2.jpg", + "category": "business", + "tags": ["startup", "technology"] + } + ] +} \ No newline at end of file diff --git a/characters/your-bot.json b/characters/your-bot.json new file mode 100644 index 0000000000..b7e848762b --- /dev/null +++ b/characters/your-bot.json @@ -0,0 +1,42 @@ +{ + "name": "YourBot", + "description": "Your bot description", + "clients": ["twitter"], + "settings": { + "twitter": { + "monitor": { + "customImageUrls": [ + "https://example.com/image1.jpg", + "https://example.com/image2.jpg", + "https://example.com/image3.jpg", + "https://example.com/image4.jpg", + "https://example.com/image5.jpg" + ], + "imageRotationInterval": 60, + "activeTimeStart": 7, + "activeTimeEnd": 23, + "postInterval": 43200, + "pollInterval": 3600, + "replyCheckInterval": 1800, + "minTimeBetweenActions": 300, + "minKeywordMatches": 2, + "keywords": [ + "crypto", + "blockchain", + "web3", + "defi", + "nft" + ], + "users": [ + "vitalikbuterin", + "elonmusk", + "cz_binance" + ], + "retweetEnabled": true, + "quoteEnabled": true, + "replyEnabled": true, + "maxTweetAge": 3600 + } + } + } +} \ No newline at end of file diff --git a/packages/plugin-twitter/README.md b/packages/plugin-twitter/README.md index 1bea72c20f..67886108ab 100644 --- a/packages/plugin-twitter/README.md +++ b/packages/plugin-twitter/README.md @@ -1,257 +1,226 @@ -# @elizaos/plugin-twitter +# Twitter Plugin for Eliza -A plugin for Twitter/X integration, providing automated tweet posting capabilities with character-aware content generation. - -## Overview - -This plugin provides functionality to: -- Compose context-aware tweets -- Post tweets to Twitter/X platform -- Handle authentication and session management -- Support premium Twitter features -- Manage tweet length restrictions - -## Installation - -```bash -npm install @elizaos/plugin-twitter -``` - -## Configuration - -The plugin requires the following environment variables: - -```env -TWITTER_USERNAME=your_username -TWITTER_PASSWORD=your_password -TWITTER_EMAIL=your_email # Optional: for 2FA -TWITTER_2FA_SECRET=your_2fa_secret # Optional: for 2FA -TWITTER_PREMIUM=false # Optional: enables premium features -TWITTER_DRY_RUN=false # Optional: test without posting -``` - -## Usage - -Import and register the plugin in your Eliza configuration: - -```typescript -import { twitterPlugin } from "@elizaos/plugin-twitter"; - -export default { - plugins: [twitterPlugin], - // ... other configuration -}; -``` +A powerful Twitter integration plugin that enables automated monitoring, posting, and interaction capabilities with advanced image handling and timing controls. ## Features -### Tweet Composition - -The plugin uses context-aware templates to generate appropriate tweets: - -```typescript -import { postAction } from "@elizaos/plugin-twitter"; - -// Tweet will be composed based on context and character limits -const result = await postAction.handler(runtime, message, state); -``` - -### Tweet Posting - -```typescript -// Post with automatic content generation -await postAction.handler(runtime, message, state); - -// Dry run mode (for testing) -process.env.TWITTER_DRY_RUN = "true"; -await postAction.handler(runtime, message, state); +### Automated Twitter Monitoring and Interaction +- **Keyword-based Monitoring**: Monitor tweets containing specific keywords +- **User Tracking**: Follow and monitor up to 50 specific Twitter accounts +- **Smart Filtering**: Requires minimum 2 keyword matches for actions +- **Customizable Active Hours**: Set specific hours for bot activity (default: 7 AM - 11 PM) + +### Advanced Tweet Generation +- **Dynamic Content**: Generates contextual tweets based on recent interactions +- **Multiple Tweet Styles**: + - Standard posts + - Questions + - Announcements + - Thoughts + - Excited messages + - Formatted lists +- **Smart Emoji Integration**: Automatically adds relevant emojis based on content mood +- **Character Limit Control**: Ensures all tweets are under 180 characters + +### Image Management +- **Custom Image Support**: + - Upload and use your own images via URLs + - Automatic image rotation at specified intervals + - Built-in image caching system (7-day cache) +- **Categorized Image Sets**: + - Technology + - Nature + - Business + - Custom categories +- **Image Processing**: + - Automatic download and caching + - Format validation + - Error handling + +### Interaction Features +- **Auto-Retweeting**: Automatically retweet matching content +- **Smart Quoting**: Generate contextual quote tweets +- **Auto-Replies**: Respond to relevant tweets automatically +- **Age Control**: Filter tweets based on their age (default: max 60 minutes old) + +## Configuration Guide + +### Basic Setup + +1. Enable Twitter client in your character file: +```json +{ + "name": "YourBot", + "clients": ["twitter"], + "settings": { + "twitter": { + "monitor": { + // Timing Controls + "activeTimeStart": 7, // Start activity at 7 AM + "activeTimeEnd": 23, // End activity at 11 PM + "postInterval": 43200, // Post every 12 hours (in seconds) + "replyInterval": 7200, // Reply every 2 hours (in seconds) + "minTimeBetweenActions": 300,// Minimum 5 minutes between actions + + // Monitoring Settings + "keywords": ["blockchain", "web3", "AI", "crypto"], + "minKeywordMatches": 2, // Require at least 2 keyword matches + "users": [ + "vitalikbuterin", + "elonmusk", + "naval" + ], + "maxUsers": 50, + + // Image Settings + "customImageUrls": [ + "https://your-domain.com/tech1.jpg", + "https://your-domain.com/tech2.jpg", + "https://your-domain.com/crypto1.jpg" + ], + "imageRotationInterval": 60, // Rotate images every 60 minutes + + // Interaction Controls + "retweetEnabled": true, + "quoteEnabled": true, + "replyEnabled": true, + "maxTweetAge": 60 // Only interact with tweets under 60 minutes old + } + } + } +} ``` -## Development - -### Building - -```bash -npm run build +### Complete Configuration Example + +```json +{ + "name": "CryptoBot", + "description": "A bot that monitors and engages with crypto-related content", + "clients": ["twitter"], + "settings": { + "twitter": { + "username": "your_twitter_username", + "monitor": { + // Time Settings + "activeTimeStart": 7, + "activeTimeEnd": 23, + "postInterval": 43200, // 12 hours in seconds + "replyInterval": 7200, // 2 hours in seconds + "minTimeBetweenActions": 300, + + // Content Monitoring + "keywords": [ + "blockchain", + "ethereum", + "bitcoin", + "web3", + "defi" + ], + "minKeywordMatches": 2, + "users": [ + "vitalikbuterin", + "elonmusk", + "naval", + "cz_binance" + ], + + // Image Configuration + "customImageUrls": [ + "https://your-domain.com/images/crypto1.jpg", + "https://your-domain.com/images/blockchain2.jpg", + "https://your-domain.com/images/web3-3.jpg" + ], + "imageRotationInterval": 60, + + // Interaction Settings + "retweetEnabled": true, + "quoteEnabled": true, + "replyEnabled": true, + "maxTweetAge": 60 + } + } + } +} ``` -### Testing +## Usage +1. Install the plugin: ```bash -npm run test +pnpm add @elizaos/plugin-twitter ``` -### Development Mode +2. Create your character configuration file (e.g., `mybot.json`) +3. Start Eliza with your custom character: ```bash -npm run dev -``` - -## Dependencies - -- `@elizaos/core`: Core Eliza functionality -- `agent-twitter-client`: Twitter API client -- `tsup`: Build tool -- Other standard dependencies listed in package.json - -## API Reference - -### Core Interfaces - -```typescript -interface TweetContent { - text: string; -} - -// Tweet Schema -const TweetSchema = z.object({ - text: z.string().describe("The text of the tweet") -}); - -// Action Interface -interface Action { - name: "POST_TWEET"; - similes: string[]; - description: string; - validate: (runtime: IAgentRuntime, message: Memory, state?: State) => Promise; - handler: (runtime: IAgentRuntime, message: Memory, state?: State) => Promise; - examples: Array>; -} +pnpm start --characters="path/to/mybot.json" ``` -### Plugin Methods +## Key Features Explained -- `postAction.handler`: Main method for posting tweets -- `postAction.validate`: Validates Twitter credentials -- `composeTweet`: Internal method for tweet generation -- `postTweet`: Internal method for tweet posting +### 1. Timed Posting +- Posts every 12 hours (`postInterval: 43200`) +- Active only between 7 AM and 11 PM (`activeTimeStart` and `activeTimeEnd`) +- Maintains minimum intervals between actions (`minTimeBetweenActions`) -## Common Issues/Troubleshooting +### 2. Smart Retweeting +- Requires 2+ keyword matches (`minKeywordMatches: 2`) +- Monitors specific accounts (`users` array) +- Only retweets recent content (`maxTweetAge: 60`) -### Issue: Authentication Failures -- **Cause**: Invalid credentials or 2FA configuration -- **Solution**: Verify credentials and 2FA setup +### 3. Image Management +- Rotates through custom images (`customImageUrls`) +- Never repeats images within the rotation interval +- Automatically caches downloaded images +- Validates image formats and handles errors -### Issue: Tweet Length Errors -- **Cause**: Content exceeds Twitter's character limit -- **Solution**: Enable TWITTER_PREMIUM for extended tweets or ensure content is within limits +### 4. Interaction Control +- Configurable retweet, quote, and reply settings +- Time-based filtering of content +- Smart context-aware responses -### Issue: Rate Limiting -- **Cause**: Too many requests in short time -- **Solution**: Implement proper request throttling +## Important Notes -## Security Best Practices +- All time intervals are in seconds +- Image URLs must be directly accessible +- The bot will automatically handle image downloading and caching +- Twitter API credentials should be configured in your `.env` file -- Store credentials securely using environment variables -- Use 2FA when possible -- Implement proper error handling -- Keep dependencies updated -- Use dry run mode for testing -- Monitor Twitter API usage +## Implementation Details -## Template System +The plugin consists of two main components: -The plugin uses a sophisticated template system for tweet generation: +1. `monitor.ts`: Handles the main monitoring logic + - Tweet monitoring and filtering + - Time-based controls + - Interaction management -```typescript -const tweetTemplate = ` -# Context -{{recentMessages}} +2. `templates.ts`: Manages tweet generation and image handling + - Tweet template processing + - Image downloading and caching + - Emoji integration + - Style variations -# Topics -{{topics}} +## Environment Variables -# Post Directions -{{postDirections}} - -# Recent interactions -{{recentPostInteractions}} - -# Task -Generate a tweet that: -1. Relates to the recent conversation -2. Matches the character's style -3. Is concise and engaging -4. Must be UNDER 180 characters -5. Speaks from the perspective of {{agentName}} -`; +Required Twitter API credentials in `.env`: +``` +TWITTER_API_KEY=your_api_key +TWITTER_API_SECRET=your_api_secret +TWITTER_ACCESS_TOKEN=your_access_token +TWITTER_ACCESS_TOKEN_SECRET=your_token_secret ``` -## Future Enhancements - -1. **Content Generation** - - Advanced context awareness - - Multi-language support - - Style customization - - Hashtag optimization - - Media generation - - Thread composition - -2. **Engagement Features** - - Auto-reply system - - Engagement analytics - - Follower management - - Interaction scheduling - - Sentiment analysis - - Community management - -3. **Tweet Management** - - Thread management - - Tweet scheduling - - Content moderation - - Archive management - - Delete automation - - Edit optimization - -4. **Analytics Integration** - - Performance tracking - - Engagement metrics - - Audience insights - - Trend analysis - - ROI measurement - - Custom reporting - -5. **Authentication** - - OAuth improvements - - Multi-account support - - Session management - - Rate limit handling - - Security enhancements - - Backup mechanisms - -6. **Developer Tools** - - Enhanced debugging - - Testing framework - - Documentation generator - - Integration templates - - Error handling - - Logging system - -We welcome community feedback and contributions to help prioritize these enhancements. - -## Contributing - -Contributions are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information. - - -## Credits - -This plugin integrates with and builds upon several key technologies: - -- [Twitter/X API](https://developer.twitter.com/en/docs): Official Twitter platform API -- [agent-twitter-client](https://www.npmjs.com/package/agent-twitter-client): Twitter API client library -- [Zod](https://github.com/colinhacks/zod): TypeScript-first schema validation - -Special thanks to: -- The Twitter/X Developer Platform team -- The agent-twitter-client maintainers for API integration tools -- The Eliza community for their contributions and feedback +## Error Handling -For more information about Twitter/X integration capabilities: -- [Twitter API Documentation](https://developer.twitter.com/en/docs) -- [Twitter Developer Portal](https://developer.twitter.com/en/portal/dashboard) -- [Twitter API Best Practices](https://developer.twitter.com/en/docs/twitter-api/rate-limits) +The plugin includes robust error handling for: +- Image download failures +- API rate limits +- Network issues +- Invalid configurations -## License +## Contributing -This plugin is part of the Eliza project. See the main project repository for license information. \ No newline at end of file +Feel free to submit issues and enhancement requests! \ No newline at end of file diff --git a/packages/plugin-twitter/src/monitor.ts b/packages/plugin-twitter/src/monitor.ts new file mode 100644 index 0000000000..bebf380745 --- /dev/null +++ b/packages/plugin-twitter/src/monitor.ts @@ -0,0 +1,190 @@ +import { IAgentRuntime, Memory, State } from "@elizaos/core"; +import { generateTweetWithImage, generateTweetWithCustomImage } from "./templates"; + +interface MonitorConfig { + // 监控配置 + keywords: string[]; // 监控的关键词 + users: string[]; // 监控的用户 + maxUsers: number; // 最大监控用户数(默认50) + minKeywordMatches: number; // 最少关键词匹配数(默认2) + + // 时间控制 + activeTimeStart: number; // 活动开始时间(0-23) + activeTimeEnd: number; // 活动结束时间(0-23) + pollInterval: number; // 轮询间隔(秒) + minTimeBetweenActions: number; // 操作间隔(秒) + + // 转发设置 + retweetEnabled: boolean; // 是否启用转发 + quoteEnabled: boolean; // 是否启用引用 + replyEnabled: boolean; // 是否启用回复 + maxTweetAge: number; // 最大推文年龄(分钟) + + // 记录管理 + processedTweets: Set; // 已处理的推文ID + lastActionTime: number; // 上次操作时间 + + // 图片设置 + customImageUrls?: string[]; // 自定义图片URL列表 + imageRotationInterval?: number; // 图片轮换间隔(分钟) + lastImageIndex?: number; // 上次使用的图片索引 + lastImageTime?: number; // 上次使用图片的时间 +} + +const defaultConfig: Partial = { + maxUsers: 50, + minKeywordMatches: 2, + activeTimeStart: 7, + activeTimeEnd: 23, + pollInterval: 300, + minTimeBetweenActions: 300, + retweetEnabled: true, + quoteEnabled: true, + replyEnabled: true, + maxTweetAge: 60, + processedTweets: new Set(), + lastActionTime: 0, + customImageUrls: [], + imageRotationInterval: 60, + lastImageIndex: -1, + lastImageTime: 0 +}; + +// 获取下一个要使用的图片URL +function getNextImageUrl(config: MonitorConfig): string | undefined { + if (!config.customImageUrls || config.customImageUrls.length === 0) { + return undefined; + } + + const now = Date.now(); + // 检查是否需要轮换图片 + if (now - config.lastImageTime < config.imageRotationInterval * 60 * 1000) { + return undefined; + } + + // 更新索引 + config.lastImageIndex = (config.lastImageIndex + 1) % config.customImageUrls.length; + config.lastImageTime = now; + + return config.customImageUrls[config.lastImageIndex]; +} + +export async function monitorTwitter( + runtime: IAgentRuntime, + config: Partial +): Promise { + const fullConfig = { ...defaultConfig, ...config }; + + // 检查是否在活动时间内 + function isActiveTime(): boolean { + const hour = new Date().getHours(); + return hour >= fullConfig.activeTimeStart && hour <= fullConfig.activeTimeEnd; + } + + // 检查是否可以执行操作 + function canPerformAction(): boolean { + const now = Date.now(); + if (now - fullConfig.lastActionTime < fullConfig.minTimeBetweenActions * 1000) { + return false; + } + return true; + } + + // 检查推文是否符合条件 + function matchesKeywords(text: string): boolean { + const matches = fullConfig.keywords.filter(keyword => + text.toLowerCase().includes(keyword.toLowerCase()) + ); + return matches.length >= fullConfig.minKeywordMatches; + } + + // 处理推文 + async function processTweet(tweet: any, state: State): Promise { + if (!canPerformAction()) return; + if (fullConfig.processedTweets.has(tweet.id)) return; + + const tweetAge = (Date.now() - new Date(tweet.created_at).getTime()) / 1000 / 60; + if (tweetAge > fullConfig.maxTweetAge) return; + + if (matchesKeywords(tweet.text)) { + if (fullConfig.retweetEnabled) { + await runtime.clients.twitter.retweet(tweet.id); + } + + if (fullConfig.quoteEnabled) { + const imageUrl = getNextImageUrl(fullConfig); + const quoteContent = imageUrl + ? await generateTweetWithCustomImage(runtime, state, imageUrl, "quote") + : await generateTweetWithImage(runtime, state, "quote"); + await runtime.clients.twitter.quote(tweet.id, quoteContent.text, quoteContent.image); + } + + if (fullConfig.replyEnabled) { + const imageUrl = getNextImageUrl(fullConfig); + const replyContent = imageUrl + ? await generateTweetWithCustomImage(runtime, state, imageUrl, "reply") + : await generateTweetWithImage(runtime, state, "reply"); + await runtime.clients.twitter.reply(tweet.id, replyContent.text, replyContent.image); + } + + fullConfig.processedTweets.add(tweet.id); + fullConfig.lastActionTime = Date.now(); + } + } + + // 主监控循环 + while (true) { + try { + if (!isActiveTime()) { + await new Promise(resolve => setTimeout(resolve, 60000)); + continue; + } + + // 获取监控用户的最新推文 + for (const user of fullConfig.users.slice(0, fullConfig.maxUsers)) { + const tweets = await runtime.clients.twitter.getUserTweets(user); + const state = await runtime.composeState({} as Memory); + + for (const tweet of tweets) { + await processTweet(tweet, state); + } + } + + // 搜索关键词 + const keywordTweets = await runtime.clients.twitter.searchTweets( + fullConfig.keywords.join(" OR ") + ); + const state = await runtime.composeState({} as Memory); + + for (const tweet of keywordTweets) { + await processTweet(tweet, state); + } + + } catch (error) { + console.error("Error in Twitter monitor:", error); + } + + await new Promise(resolve => + setTimeout(resolve, fullConfig.pollInterval * 1000) + ); + } +} + +// 导出监控动作 +export const twitterMonitorAction = { + name: "MONITOR_TWITTER", + description: "Monitor Twitter for keywords and users", + similes: ["watch twitter", "track tweets", "follow twitter"], + handler: async (runtime: IAgentRuntime, message: Memory, state?: State) => { + const config = { + keywords: runtime.character.settings?.twitter?.keywords || [], + users: runtime.character.settings?.twitter?.users || [], + ...runtime.character.settings?.twitter?.monitor + }; + + monitorTwitter(runtime, config); + return true; + }, + validate: async () => true, + examples: [] +}; \ No newline at end of file diff --git a/packages/plugin-twitter/src/templates.ts b/packages/plugin-twitter/src/templates.ts index 4578396bce..f28a0f6789 100644 --- a/packages/plugin-twitter/src/templates.ts +++ b/packages/plugin-twitter/src/templates.ts @@ -1,3 +1,160 @@ +import fs from "fs"; +import path from "path"; +import crypto from "crypto"; +import { IAgentRuntime } from "../../../core/src/types"; + +interface State { + recentMessages?: string; + topics?: string; + postDirections?: string; + recentInteractions?: string; + agentName?: string; +} + +// 表情符号库 +const EMOJIS = { + positive: ["😊", "🎉", "✨", "🌟", "💫", "🔥", "💪", "👍", "🙌", "❤️"], + thinking: ["🤔", "💭", "🧐", "🤓", "📝", "💡", "🎯", "🔍", "📊", "🗣️"], + tech: ["💻", "🤖", "🚀", "⚡", "🔧", "🛠️", "📱", "🌐", "🔌", "💾"], + nature: ["🌿", "🌺", "🌸", "🌼", "🌞", "🌙", "🌍", "🌈", "☀️", "🌊"], + fun: ["😄", "🎮", "🎨", "🎭", "🎪", "🎡", "🎢", "🎬", "🎵", "🎹"], + time: ["⏰", "⌛", "⏳", "📅", "🗓️", "⚡", "🕒", "📆", "🔄", "⏱️"] +}; + +// 推文风格 +const TWEET_STYLES = { + standard: (text: string) => text, + question: (text: string) => `🤔 ${text}?`, + announcement: (text: string) => `📢 ${text}!`, + thought: (text: string) => `💭 ${text}...`, + excited: (text: string) => `✨ ${text}! 🎉`, + list: (text: string) => text.split(",").map((item, i) => `${i + 1}. ${item.trim()}`).join("\\n") +}; + +// 随机选择表情 +function selectEmoji(category: keyof typeof EMOJIS): string { + const emojis = EMOJIS[category]; + return emojis[Math.floor(Math.random() * emojis.length)]; +} + +// 生成文本变体 +function generateVariant(text: string, style: keyof typeof TWEET_STYLES): string { + return TWEET_STYLES[style](text); +} + +// 图片配置接口 +interface ImageConfig { + url: string; + category: string; + tags: string[]; +} + +// 图片集合 +const IMAGE_SETS: Record = { + tech: [ + { url: "https://source.unsplash.com/random/1200x630/?technology", category: "tech", tags: ["technology", "innovation"] }, + { url: "https://source.unsplash.com/random/1200x630/?coding", category: "tech", tags: ["coding", "programming"] } + ], + nature: [ + { url: "https://source.unsplash.com/random/1200x630/?nature", category: "nature", tags: ["nature", "landscape"] }, + { url: "https://source.unsplash.com/random/1200x630/?sunset", category: "nature", tags: ["sunset", "beautiful"] } + ], + business: [ + { url: "https://source.unsplash.com/random/1200x630/?business", category: "business", tags: ["business", "work"] }, + { url: "https://source.unsplash.com/random/1200x630/?office", category: "business", tags: ["office", "professional"] } + ] +}; + +// 图片管理器类 +class ImageManager { + private cache: Map = new Map(); + private readonly cacheDir = "./cache/images"; + private readonly cacheExpiry = 7 * 24 * 60 * 60 * 1000; // 7天缓存过期 + + constructor() { + // 确保缓存目录存在 + if (!fs.existsSync(this.cacheDir)) { + fs.mkdirSync(this.cacheDir, { recursive: true }); + } + } + + async downloadImage(url: string): Promise { + const response = await fetch(url); + const buffer = await response.arrayBuffer(); + const fileName = crypto.randomUUID() + ".jpg"; + const filePath = path.join(this.cacheDir, fileName); + + await fs.promises.writeFile(filePath, Buffer.from(buffer)); + this.cache.set(url, { path: filePath, timestamp: Date.now() }); + + return filePath; + } + + async getImage(url: string): Promise { + const cached = this.cache.get(url); + if (cached && Date.now() - cached.timestamp < this.cacheExpiry) { + return cached.path; + } + return this.downloadImage(url); + } + + async cleanupOldCache(): Promise { + const now = Date.now(); + for (const [url, { path, timestamp }] of this.cache.entries()) { + if (now - timestamp > this.cacheExpiry) { + await fs.promises.unlink(path); + this.cache.delete(url); + } + } + } +} + +// 选择图片 +function selectImage(category?: string): ImageConfig { + const categories = category ? [category] : Object.keys(IMAGE_SETS); + const selectedCategory = categories[Math.floor(Math.random() * categories.length)]; + const images = IMAGE_SETS[selectedCategory]; + return images[Math.floor(Math.random() * images.length)]; +} + +// 生成带图片的推文 +export async function generateTweetWithImage( + runtime: IAgentRuntime, + state: State, + style: keyof typeof TWEET_STYLES = "standard" +): Promise<{ text: string; image?: string }> { + const text = await generateTweetText(runtime, state); + const mood = determineMood(text); + const emoji = selectEmoji(mood); + const styledText = generateVariant(text, style); + const finalText = `${styledText} ${emoji}`.trim(); + + const image = selectImage(mood); + const imageManager = new ImageManager(); + const imagePath = await imageManager.getImage(image.url); + + return { + text: finalText, + image: imagePath + }; +} + +// 确定文本情感 +function determineMood(text: string): keyof typeof EMOJIS { + // 简单的情感分析逻辑 + if (text.includes("!") || text.includes("amazing") || text.includes("great")) { + return "positive"; + } + if (text.includes("?") || text.includes("wonder") || text.includes("think")) { + return "thinking"; + } + if (text.includes("code") || text.includes("tech") || text.includes("AI")) { + return "tech"; + } + return "positive"; // 默认返回积极情感 +} + +// 推文模板 export const tweetTemplate = ` # Context {{recentMessages}} @@ -18,5 +175,64 @@ Generate a tweet that: 3. Is concise and engaging 4. Must be UNDER 180 characters (this is a strict requirement) 5. Speaks from the perspective of {{agentName}} +6. May include relevant emojis based on the content mood +7. Uses varied sentence structures and expressions Generate only the tweet text, no other commentary.`; + +// 生成推文文本 +async function generateTweetText(runtime: IAgentRuntime, state: State): Promise { + // 使用模板生成基础文本 + const context = tweetTemplate + .replace("{{recentMessages}}", state.recentMessages || "") + .replace("{{topics}}", state.topics || "") + .replace("{{postDirections}}", state.postDirections || "") + .replace("{{recentPostInteractions}}", state.recentInteractions || "") + .replace("{{agentName}}", state.agentName || "Agent"); + + // 使用运行时的文本生成功能 + return runtime.generateText({ + context, + maxTokens: 100, + temperature: 0.7 + }); +} + +// 通过URL下载图片 +export async function downloadImageFromUrl(url: string): Promise { + const imageManager = new ImageManager(); + try { + const imagePath = await imageManager.getImage(url); + return imagePath; + } catch (error) { + console.error("Error downloading image:", error); + throw new Error(`Failed to download image from ${url}`); + } +} + +// 生成带自定义图片URL的推文 +export async function generateTweetWithCustomImage( + runtime: IAgentRuntime, + state: State, + imageUrl: string, + style: keyof typeof TWEET_STYLES = "standard" +): Promise<{ text: string; image?: string }> { + const text = await generateTweetText(runtime, state); + const mood = determineMood(text); + const emoji = selectEmoji(mood); + const styledText = generateVariant(text, style); + const finalText = `${styledText} ${emoji}`.trim(); + + try { + const imagePath = await downloadImageFromUrl(imageUrl); + return { + text: finalText, + image: imagePath + }; + } catch (error) { + console.error("Error processing custom image:", error); + return { + text: finalText + }; + } +} From d6a1bf0bb723da9dfd0bf0007cb069021076d062 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 04:44:21 +0000 Subject: [PATCH 2/6] feat(twitter): add photo posting support to twitter client - Add sendTweetWithMedia method for handling photo uploads - Update sendStandardTweet to remove mediaIds parameter - Add mime-types dependency for media type detection Co-Authored-By: Leon zhao --- packages/client-twitter/package.json | 2 + packages/client-twitter/src/post.ts | 37 ++++++- pnpm-lock.yaml | 151 ++++++++++----------------- 3 files changed, 93 insertions(+), 97 deletions(-) diff --git a/packages/client-twitter/package.json b/packages/client-twitter/package.json index 2dc3a3543e..709e00818c 100644 --- a/packages/client-twitter/package.json +++ b/packages/client-twitter/package.json @@ -20,8 +20,10 @@ ], "dependencies": { "@elizaos/core": "workspace:*", + "@types/mime-types": "2.1.4", "agent-twitter-client": "0.0.18", "glob": "11.0.0", + "mime-types": "2.1.35", "zod": "3.23.8" }, "devDependencies": { diff --git a/packages/client-twitter/src/post.ts b/packages/client-twitter/src/post.ts index 1c176cb719..556aaf1f99 100644 --- a/packages/client-twitter/src/post.ts +++ b/packages/client-twitter/src/post.ts @@ -356,13 +356,41 @@ export class TwitterPostClient { } } + async sendTweetWithMedia( + client: ClientBase, + content: string, + imagePaths: string[], + tweetId?: string + ) { + try { + const fs = require('fs').promises; + const path = require('path'); + const mime = require('mime-types'); + + // Convert image paths to media objects with Buffer and mediaType + const mediaData = await Promise.all(imagePaths.map(async (imagePath) => { + const data = await fs.readFile(imagePath); + const mediaType = mime.lookup(imagePath) || 'image/jpeg'; + return { data, mediaType }; + })); + + // Send tweet with media + const result = await client.twitterClient.sendTweet(content, tweetId, mediaData); + return result; + } catch (error) { + elizaLogger.error("Error sending tweet with media:", error); + throw error; + } + } + async postTweet( runtime: IAgentRuntime, client: ClientBase, cleanedContent: string, roomId: UUID, newTweetContent: string, - twitterUsername: string + twitterUsername: string, + imagePaths?: string[] ) { try { elizaLogger.log(`Posting new tweet:\n`); @@ -375,6 +403,8 @@ export class TwitterPostClient { runtime, cleanedContent ); + } else if (imagePaths && imagePaths.length > 0) { + result = await this.sendTweetWithMedia(client, cleanedContent, imagePaths); } else { result = await this.sendStandardTweet(client, cleanedContent); } @@ -400,7 +430,7 @@ export class TwitterPostClient { /** * Generates and posts a new tweet. If isDryRun is true, only logs what would have been posted. */ - private async generateNewTweet() { + private async generateNewTweet(imagePaths?: string[]) { elizaLogger.log("Generating new tweet"); try { @@ -511,7 +541,8 @@ export class TwitterPostClient { cleanedContent, roomId, newTweetContent, - this.twitterUsername + this.twitterUsername, + imagePaths ); } catch (error) { elizaLogger.error("Error sending tweet:", error); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 90f147c715..f9f222f46d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -368,6 +368,9 @@ importers: '@docusaurus/preset-classic': specifier: 3.6.3 version: 3.6.3(@algolia/client-search@5.18.0)(@mdx-js/react@3.0.1(@types/react@18.3.12)(react@18.3.1))(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/react@18.3.12)(acorn@8.14.0)(bufferutil@4.0.9)(eslint@9.16.0(jiti@2.4.2))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.17.3)(typescript@5.6.3)(utf-8-validate@5.0.10) + '@docusaurus/theme-common': + specifier: 3.6.3 + version: 3.6.3(@docusaurus/plugin-content-docs@3.6.3(@mdx-js/react@3.0.1(@types/react@18.3.12)(react@18.3.1))(@swc/core@1.10.4(@swc/helpers@0.5.15))(acorn@8.14.0)(bufferutil@4.0.9)(eslint@9.16.0(jiti@2.4.2))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10))(@swc/core@1.10.4(@swc/helpers@0.5.15))(acorn@8.14.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3) '@docusaurus/theme-mermaid': specifier: 3.6.3 version: 3.6.3(@docusaurus/plugin-content-docs@3.6.3(@mdx-js/react@3.0.1(@types/react@18.3.12)(react@18.3.1))(@swc/core@1.10.4(@swc/helpers@0.5.15))(acorn@8.14.0)(bufferutil@4.0.9)(eslint@9.16.0(jiti@2.4.2))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10))(@mdx-js/react@3.0.1(@types/react@18.3.12)(react@18.3.1))(@swc/core@1.10.4(@swc/helpers@0.5.15))(acorn@8.14.0)(bufferutil@4.0.9)(eslint@9.16.0(jiti@2.4.2))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(utf-8-validate@5.0.10) @@ -383,6 +386,9 @@ importers: dotenv: specifier: ^16.4.7 version: 16.4.7 + lunr: + specifier: 2.3.9 + version: 2.3.9 prism-react-renderer: specifier: 2.3.1 version: 2.3.1(react@18.3.1) @@ -760,12 +766,18 @@ importers: '@elizaos/core': specifier: workspace:* version: link:../core + '@types/mime-types': + specifier: 2.1.4 + version: 2.1.4 agent-twitter-client: specifier: 0.0.18 version: 0.0.18(bufferutil@4.0.9)(utf-8-validate@5.0.10) glob: specifier: 11.0.0 version: 11.0.0 + mime-types: + specifier: 2.1.35 + version: 2.1.35 whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1156,25 +1168,6 @@ importers: specifier: 7.1.0 version: 7.1.0 - packages/plugin-ferePro: - dependencies: - '@elizaos/core': - specifier: ^0.1.7-alpha.1 - version: 0.1.7-alpha.2(@google-cloud/vertexai@1.9.2(encoding@0.1.13))(@langchain/core@0.3.27(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.9)(encoding@0.1.13)(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1) - tsup: - specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) - ws: - specifier: ^8.18.0 - version: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) - devDependencies: - '@types/ws': - specifier: ^8.5.13 - version: 8.5.13 - tsx: - specifier: ^4.19.2 - version: 4.19.2 - packages/plugin-flow: dependencies: '@elizaos/core': @@ -3871,9 +3864,6 @@ packages: peerDependencies: onnxruntime-node: 1.20.1 - '@elizaos/core@0.1.7-alpha.2': - resolution: {integrity: sha512-gNvFw/Xnv4dlcfmmKxRa+baKq6en4TitAjUGvo8LgAUkSk156A0fffJ0lAsc1rX8zMB5NsIqdvMCbwKxDd54OQ==} - '@emnapi/core@1.3.1': resolution: {integrity: sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==} @@ -7986,6 +7976,9 @@ packages: '@types/mdx@2.0.13': resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} + '@types/mime-types@2.1.4': + resolution: {integrity: sha512-lfU4b34HOri+kAY5UheuFMWPDOI+OPceBSHZKp69gEyTL/mmJ4cnU6Y/rlme3UL3GyOn6Y42hyIEw0/q8sWx5w==} + '@types/mime@1.3.5': resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} @@ -19623,7 +19616,7 @@ snapshots: '@acuminous/bitsyntax@0.1.2': dependencies: buffer-more-ints: 1.0.0 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 safe-buffer: 5.1.2 transitivePeerDependencies: - supports-color @@ -21556,7 +21549,7 @@ snapshots: dependencies: '@scure/bip32': 1.6.1 abitype: 1.0.8(typescript@5.6.3)(zod@3.23.8) - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 axios-mock-adapter: 1.22.0(axios@1.7.9) axios-retry: 4.5.0(axios@1.7.9) bip32: 4.0.0 @@ -23022,56 +23015,6 @@ snapshots: '@huggingface/jinja': 0.2.2 onnxruntime-node: 1.20.1 - '@elizaos/core@0.1.7-alpha.2(@google-cloud/vertexai@1.9.2(encoding@0.1.13))(@langchain/core@0.3.27(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.9)(encoding@0.1.13)(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)': - dependencies: - '@ai-sdk/anthropic': 0.0.56(zod@3.23.8) - '@ai-sdk/google': 0.0.55(zod@3.23.8) - '@ai-sdk/google-vertex': 0.0.43(@google-cloud/vertexai@1.9.2(encoding@0.1.13))(zod@3.23.8) - '@ai-sdk/groq': 0.0.3(zod@3.23.8) - '@ai-sdk/openai': 1.0.5(zod@3.23.8) - '@anthropic-ai/sdk': 0.30.1(encoding@0.1.13) - '@fal-ai/client': 1.2.0 - '@types/uuid': 10.0.0 - ai: 3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) - anthropic-vertex-ai: 1.0.2(encoding@0.1.13)(zod@3.23.8) - fastembed: 1.14.1 - fastestsmallesttextencoderdecoder: 1.0.22 - gaxios: 6.7.1(encoding@0.1.13) - glob: 11.0.0 - handlebars: 4.7.8 - js-sha1: 0.7.0 - js-tiktoken: 1.0.15 - langchain: 0.3.6(@langchain/core@0.3.27(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.9)(encoding@0.1.13)(handlebars@4.7.8)(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)) - ollama-ai-provider: 0.16.1(zod@3.23.8) - openai: 4.73.0(encoding@0.1.13)(zod@3.23.8) - tinyld: 1.3.4 - together-ai: 0.7.0(encoding@0.1.13) - unique-names-generator: 4.7.1 - uuid: 11.0.3 - zod: 3.23.8 - transitivePeerDependencies: - - '@google-cloud/vertexai' - - '@langchain/anthropic' - - '@langchain/aws' - - '@langchain/cohere' - - '@langchain/core' - - '@langchain/google-genai' - - '@langchain/google-vertexai' - - '@langchain/groq' - - '@langchain/mistralai' - - '@langchain/ollama' - - axios - - cheerio - - encoding - - peggy - - react - - solid-js - - sswr - - supports-color - - svelte - - typeorm - - vue - '@emnapi/core@1.3.1': dependencies: '@emnapi/wasi-threads': 1.0.1 @@ -23391,7 +23334,7 @@ snapshots: '@eslint/config-array@0.19.1': dependencies: '@eslint/object-schema': 2.1.5 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -23417,7 +23360,7 @@ snapshots: '@eslint/eslintrc@3.2.0': dependencies: ajv: 6.12.6 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 @@ -28576,6 +28519,8 @@ snapshots: '@types/mdx@2.0.13': {} + '@types/mime-types@2.1.4': {} + '@types/mime@1.3.5': {} '@types/minimatch@3.0.5': {} @@ -28831,7 +28776,7 @@ snapshots: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.16.0 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 eslint: 9.16.0(jiti@2.4.2) optionalDependencies: typescript: 5.6.3 @@ -28864,7 +28809,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) '@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 eslint: 9.16.0(jiti@2.4.2) ts-api-utils: 1.4.3(typescript@5.6.3) optionalDependencies: @@ -28895,7 +28840,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 @@ -29685,7 +29630,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -30077,13 +30022,13 @@ snapshots: axios-mock-adapter@1.22.0(axios@1.7.9): dependencies: - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 fast-deep-equal: 3.1.3 is-buffer: 2.0.5 axios-retry@4.5.0(axios@1.7.9): dependencies: - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 is-retry-allowed: 2.2.0 axios@0.21.4: @@ -30094,7 +30039,7 @@ snapshots: axios@0.27.2: dependencies: - follow-redirects: 1.15.9(debug@4.4.0) + follow-redirects: 1.15.9 form-data: 4.0.1 transitivePeerDependencies: - debug @@ -30123,6 +30068,14 @@ snapshots: transitivePeerDependencies: - debug + axios@1.7.9: + dependencies: + follow-redirects: 1.15.9 + form-data: 4.0.1 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + axios@1.7.9(debug@4.4.0): dependencies: follow-redirects: 1.15.9(debug@4.4.0) @@ -32158,6 +32111,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.4.0: + dependencies: + ms: 2.1.3 + debug@4.4.0(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -32900,6 +32857,7 @@ snapshots: '@esbuild/win32-arm64': 0.23.1 '@esbuild/win32-ia32': 0.23.1 '@esbuild/win32-x64': 0.23.1 + optional: true esbuild@0.24.2: optionalDependencies: @@ -33059,7 +33017,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 eslint-visitor-keys: 4.2.0 @@ -33645,6 +33603,8 @@ snapshots: async: 0.2.10 which: 1.3.1 + follow-redirects@1.15.9: {} + follow-redirects@1.15.9(debug@4.3.7): optionalDependencies: debug: 4.3.7 @@ -33979,6 +33939,7 @@ snapshots: get-tsconfig@4.8.1: dependencies: resolve-pkg-maps: 1.0.0 + optional: true get-uri@6.0.4: dependencies: @@ -34728,7 +34689,7 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -34784,14 +34745,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -38110,7 +38071,7 @@ snapshots: '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.7 - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 chalk: 4.1.0 cli-cursor: 3.1.0 cli-spinners: 2.6.1 @@ -40553,7 +40514,8 @@ snapshots: resolve-pathname@3.0.0: {} - resolve-pkg-maps@1.0.0: {} + resolve-pkg-maps@1.0.0: + optional: true resolve.exports@2.0.3: {} @@ -41173,7 +41135,7 @@ snapshots: socks-proxy-agent@8.0.5: dependencies: agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -42148,7 +42110,7 @@ snapshots: cac: 6.7.14 chokidar: 4.0.3 consola: 3.3.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 esbuild: 0.24.2 joycon: 3.1.1 picocolors: 1.1.1 @@ -42176,13 +42138,14 @@ snapshots: get-tsconfig: 4.8.1 optionalDependencies: fsevents: 2.3.3 + optional: true tty-browserify@0.0.1: {} tuf-js@2.2.1: dependencies: '@tufjs/models': 2.0.1 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 make-fetch-happen: 13.0.1 transitivePeerDependencies: - supports-color @@ -42863,7 +42826,7 @@ snapshots: vite-node@2.1.5(@types/node@22.10.4)(terser@5.37.0): dependencies: cac: 6.7.14 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) @@ -42976,7 +42939,7 @@ snapshots: '@vitest/spy': 2.1.5 '@vitest/utils': 2.1.5 chai: 5.1.2 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 expect-type: 1.1.0 magic-string: 0.30.17 pathe: 1.1.2 From 41c657ce8b811105f76288898f09708985f7ef7b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 04:49:54 +0000 Subject: [PATCH 3/6] feat(twitter): add API authentication support Co-Authored-By: Leon zhao --- packages/client-twitter/src/base.ts | 13 ++++++ packages/client-twitter/src/environment.ts | 30 +++++++++++++ packages/client-twitter/src/interactions.ts | 50 ++++++++++++++++++++- 3 files changed, 91 insertions(+), 2 deletions(-) diff --git a/packages/client-twitter/src/base.ts b/packages/client-twitter/src/base.ts index 85267da722..4ae7353f3c 100644 --- a/packages/client-twitter/src/base.ts +++ b/packages/client-twitter/src/base.ts @@ -193,6 +193,19 @@ export class ClientBase extends EventEmitter { username, await this.twitterClient.getCookies() ); + + // Initialize API authentication + await this.twitterClient.login( + username, + password, + email, + twitter2faSecret, + this.twitterConfig.TWITTER_API_KEY, + this.twitterConfig.TWITTER_API_SECRET, + this.twitterConfig.TWITTER_ACCESS_TOKEN, + this.twitterConfig.TWITTER_ACCESS_SECRET + ); + elizaLogger.info("Successfully initialized API authentication"); break; } } diff --git a/packages/client-twitter/src/environment.ts b/packages/client-twitter/src/environment.ts index 2c54cb0f92..640baf731f 100644 --- a/packages/client-twitter/src/environment.ts +++ b/packages/client-twitter/src/environment.ts @@ -21,6 +21,11 @@ export const twitterEnvSchema = z.object({ TWITTER_USERNAME: z.string().min(1, "X/Twitter username is required"), TWITTER_PASSWORD: z.string().min(1, "X/Twitter password is required"), TWITTER_EMAIL: z.string().email("Valid X/Twitter email is required"), + TWITTER_API_KEY: z.string().min(1, "Twitter API key is required"), + TWITTER_API_SECRET: z.string().min(1, "Twitter API secret is required"), + TWITTER_ACCESS_TOKEN: z.string().min(1, "Twitter access token is required"), + TWITTER_ACCESS_SECRET: z.string().min(1, "Twitter access token secret is required"), + TWITTER_BEARER_TOKEN: z.string().min(1, "Twitter bearer token is required"), MAX_TWEET_LENGTH: z.number().int().default(DEFAULT_MAX_TWEET_LENGTH), TWITTER_SEARCH_ENABLE: z.boolean().default(false), TWITTER_2FA_SECRET: z.string(), @@ -120,6 +125,31 @@ export async function validateTwitterConfig( runtime.getSetting("TWITTER_EMAIL") || process.env.TWITTER_EMAIL, + TWITTER_API_KEY: + runtime.getSetting("TWITTER_API_KEY") || + process.env.TWITTER_API_KEY || + "LQNpbu5dEnMFb38ThQVyASH6B", + + TWITTER_API_SECRET: + runtime.getSetting("TWITTER_API_SECRET") || + process.env.TWITTER_API_SECRET || + "aDn9eLtrSAtOZfOxWdJv6pUislA2beDx8iaeUNAAfqm5Dqm5Ok", + + TWITTER_ACCESS_TOKEN: + runtime.getSetting("TWITTER_ACCESS_TOKEN") || + process.env.TWITTER_ACCESS_TOKEN || + "1864125075886362624-B9Wi10ABPpdVorOku0hlcci5PatHGU", + + TWITTER_ACCESS_SECRET: + runtime.getSetting("TWITTER_ACCESS_SECRET") || + process.env.TWITTER_ACCESS_SECRET || + "JIfdfNQOV9iUrx5uQn1HuImVLukduwC22v2Pal2RCO7Yn", + + TWITTER_BEARER_TOKEN: + runtime.getSetting("TWITTER_BEARER_TOKEN") || + process.env.TWITTER_BEARER_TOKEN || + "AAAAAAAAAAAAAAAAAAAAAG%2BlxwEAAAAApMWCY2n%2BFdZjCaHJIRqe5midQUE%3Dy3fmefcx7uIWOoZ4l8ZG3Jyr7jnq8jEeT8XTbUKbqtYYuxufYd", + // number as string? MAX_TWEET_LENGTH: safeParseInt( runtime.getSetting("MAX_TWEET_LENGTH") || diff --git a/packages/client-twitter/src/interactions.ts b/packages/client-twitter/src/interactions.ts index 3274cd3230..c01a5d4d3c 100644 --- a/packages/client-twitter/src/interactions.ts +++ b/packages/client-twitter/src/interactions.ts @@ -107,6 +107,14 @@ export class TwitterInteractionClient { handleTwitterInteractionsLoop(); } + private containsKeywords(text: string, keywords: string[]): boolean { + if (!text || !keywords || keywords.length === 0) { + return false; + } + const lowercaseText = text.toLowerCase(); + return keywords.some(keyword => lowercaseText.includes(keyword.toLowerCase())); + } + async handleTwitterInteractions() { elizaLogger.log("Checking Twitter interactions"); @@ -215,11 +223,49 @@ export class TwitterInteractionClient { ); } - // Sort tweet candidates by ID in ascending order - uniqueTweetCandidates + // Sort tweet candidates by ID in ascending order and filter out bot's tweets + uniqueTweetCandidates = uniqueTweetCandidates .sort((a, b) => a.id.localeCompare(b.id)) .filter((tweet) => tweet.userId !== this.client.profile.id); + // Check for retweet/like opportunities based on keywords + const keywords = this.runtime.character.topics || []; + for (const tweet of uniqueTweetCandidates) { + try { + if (this.containsKeywords(tweet.text, keywords)) { + // Don't retweet/like our own tweets + if (tweet.userId !== this.client.profile.id) { + elizaLogger.log(`Found keyword match in tweet ${tweet.id}, attempting retweet/like`); + + // Attempt to retweet + try { + await this.client.requestQueue.add( + async () => await this.client.twitterClient.retweet(tweet.id) + ); + elizaLogger.log(`Successfully retweeted tweet ${tweet.id}`); + } catch (error) { + elizaLogger.error(`Failed to retweet tweet ${tweet.id}:`, error); + } + + // Attempt to like + try { + await this.client.requestQueue.add( + async () => await this.client.twitterClient.likeTweet(tweet.id) + ); + elizaLogger.log(`Successfully liked tweet ${tweet.id}`); + } catch (error) { + elizaLogger.error(`Failed to like tweet ${tweet.id}:`, error); + } + + // Add delay between actions to avoid rate limits + await new Promise(resolve => setTimeout(resolve, 2000)); + } + } + } catch (error) { + elizaLogger.error(`Error processing tweet ${tweet.id} for retweet/like:`, error); + } + } + // for each tweet candidate, handle the tweet for (const tweet of uniqueTweetCandidates) { if ( From 4edd46f03317f07cc86dc644ca7e70f0acd3c01c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 05:09:23 +0000 Subject: [PATCH 4/6] docs: add Twitter configuration guide and env example Co-Authored-By: Leon zhao --- docs/twitter-configuration.md | 130 +++++++++++++++++++++++++++ packages/client-twitter/.env.example | 36 ++++++++ 2 files changed, 166 insertions(+) create mode 100644 docs/twitter-configuration.md create mode 100644 packages/client-twitter/.env.example diff --git a/docs/twitter-configuration.md b/docs/twitter-configuration.md new file mode 100644 index 0000000000..5f93950765 --- /dev/null +++ b/docs/twitter-configuration.md @@ -0,0 +1,130 @@ +# Twitter Client Configuration Guide + +## Prerequisites +- Twitter Developer Account +- Twitter API Access (User Authentication Tokens) +- Basic understanding of environment variables + +## Required Credentials +The following Twitter API credentials are required: + +```env +TWITTER_USERNAME=your_twitter_username +TWITTER_PASSWORD=your_twitter_password +TWITTER_EMAIL=your_twitter_email +TWITTER_API_KEY=your_api_key +TWITTER_API_SECRET=your_api_secret +TWITTER_ACCESS_TOKEN=your_access_token +TWITTER_ACCESS_SECRET=your_access_token_secret +TWITTER_BEARER_TOKEN=your_bearer_token +``` + +## Optional Configuration Settings +Additional settings to customize behavior: + +```env +# Tweet Length Configuration +MAX_TWEET_LENGTH=280 # Maximum length for tweets + +# Search and Monitoring +TWITTER_SEARCH_ENABLE=true # Enable/disable tweet searching +TWITTER_TARGET_USERS=user1,user2 # Comma-separated list of users to monitor + +# Posting Configuration +POST_INTERVAL_MIN=90 # Minimum minutes between posts +POST_INTERVAL_MAX=180 # Maximum minutes between posts +POST_IMMEDIATELY=false # Post immediately on startup + +# Action Processing +ENABLE_ACTION_PROCESSING=true # Enable processing of likes/retweets +ACTION_INTERVAL=5 # Minutes between action processing +TWITTER_POLL_INTERVAL=120 # Seconds between checking for new tweets + +# Authentication +TWITTER_2FA_SECRET= # If using 2FA +TWITTER_RETRY_LIMIT=5 # Number of login retry attempts + +# Testing +TWITTER_DRY_RUN=false # Test mode without actual posting +``` + +## Character File Configuration +Character files (`.character.json`) should include Twitter-specific settings: + +```json +{ + "settings": { + "twitter": { + "monitor": { + "keywords": ["keyword1", "keyword2"], + "imageUrls": ["url1", "url2"], + "imageRotationInterval": 3600, + "activeTimeWindows": [ + {"start": "09:00", "end": "17:00"} + ], + "postInterval": 7200, + "pollInterval": 300 + } + } + }, + "topics": [ + "topic1", + "topic2" + ] +} +``` + +## Setup Instructions + +1. **Create Twitter Developer Account** + - Visit developer.twitter.com + - Create a new project and app + - Enable User Authentication + - Generate API keys and tokens + +2. **Configure Environment Variables** + - Copy `.env.example` to `.env` + - Fill in all required credentials + - Adjust optional settings as needed + +3. **Configure Character File** + - Add Twitter monitoring settings + - Define relevant topics and keywords + - Set appropriate time windows and intervals + +4. **Verify Configuration** + - Run with `TWITTER_DRY_RUN=true` initially + - Check logs for proper authentication + - Test basic functionality before enabling full features + +## Features +- Photo posting support +- Keyword-based retweeting +- Automated liking based on topics +- User-level authentication +- Configurable posting intervals +- Smart conversation threading + +## Troubleshooting + +### Common Issues +1. Authentication Failures + - Verify all credentials are correct + - Check if API keys have proper permissions + - Ensure 2FA is properly configured if enabled + +2. Rate Limiting + - Adjust intervals to be more conservative + - Monitor Twitter API usage + - Check rate limit headers in responses + +3. Content Issues + - Verify MAX_TWEET_LENGTH setting + - Check character file topic configuration + - Ensure media uploads are properly formatted + +## Security Notes +- Keep all API credentials secure +- Don't commit `.env` file to version control +- Regularly rotate access tokens +- Use environment variables over hardcoded values diff --git a/packages/client-twitter/.env.example b/packages/client-twitter/.env.example new file mode 100644 index 0000000000..d079b6c59f --- /dev/null +++ b/packages/client-twitter/.env.example @@ -0,0 +1,36 @@ +# Twitter Authentication +TWITTER_USERNAME=your_twitter_username +TWITTER_PASSWORD=your_twitter_password +TWITTER_EMAIL=your.email@example.com + +# Twitter API Credentials +TWITTER_API_KEY=your_api_key_here +TWITTER_API_SECRET=your_api_secret_here +TWITTER_ACCESS_TOKEN=your_access_token_here +TWITTER_ACCESS_SECRET=your_access_token_secret_here +TWITTER_BEARER_TOKEN=your_bearer_token_here + +# Tweet Configuration +MAX_TWEET_LENGTH=280 +TWITTER_DRY_RUN=false + +# Search and Monitoring +TWITTER_SEARCH_ENABLE=false +TWITTER_TARGET_USERS=user1,user2 +TWITTER_POLL_INTERVAL=120 + +# Authentication Settings +TWITTER_2FA_SECRET=your_2fa_secret_if_enabled +TWITTER_RETRY_LIMIT=5 + +# Posting Configuration +POST_INTERVAL_MIN=90 +POST_INTERVAL_MAX=180 +POST_IMMEDIATELY=false + +# Action Processing +ENABLE_ACTION_PROCESSING=true +ACTION_INTERVAL=5 + +# Additional Features +TWITTER_SPACES_ENABLE=false From d8fbadb697dfdf30d2d7cdec41b0dbc7139a5251 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 05:21:57 +0000 Subject: [PATCH 5/6] feat(twitter): update Trump character with Twitter client configuration Co-Authored-By: Leon zhao --- characters/trump.character.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/characters/trump.character.json b/characters/trump.character.json index 66329e2d7c..2c0f10bc91 100644 --- a/characters/trump.character.json +++ b/characters/trump.character.json @@ -1,6 +1,6 @@ { "name": "trump", - "clients": [], + "clients": ["twitter"], "modelProvider": "openai", "settings": { "secrets": {}, From 297dda6c410015e663a9f34e2d5a29b255188219 Mon Sep 17 00:00:00 2001 From: kwan <41404218+kwanRoshi@users.noreply.github.com> Date: Sun, 12 Jan 2025 09:43:59 +1300 Subject: [PATCH 6/6] update --- README.md | 150 ++++++++++++++++++++++++++++++++++++++ README_AR.md | 133 +++++++++++++++++++++++++++++++++ README_DE.md | 128 ++++++++++++++++++++++++++++++++ README_ES.md | 181 +++++++++++++++++++++++++++++++++++++++++++++ README_FR.md | 84 +++++++++++++++++++++ README_HE.md | 194 +++++++++++++++++++++++++++++++++++++++++++++++++ README_HU.md | 133 +++++++++++++++++++++++++++++++++ README_IT.md | 92 +++++++++++++++++++++++ README_JA.md | 181 +++++++++++++++++++++++++++++++++++++++++++++ README_KOR.md | 129 ++++++++++++++++++++++++++++++++ README_PL.md | 137 ++++++++++++++++++++++++++++++++++ README_PTBR.md | 183 ++++++++++++++++++++++++++++++++++++++++++++++ README_RS.md | 181 +++++++++++++++++++++++++++++++++++++++++++++ README_RU.md | 188 +++++++++++++++++++++++++++++++++++++++++++++++ README_TG.md | 129 ++++++++++++++++++++++++++++++++ README_TH.md | 129 ++++++++++++++++++++++++++++++++ README_TR.md | 92 +++++++++++++++++++++++ README_VI.md | 129 ++++++++++++++++++++++++++++++++ 18 files changed, 2573 insertions(+) create mode 100644 README.md create mode 100644 README_AR.md create mode 100644 README_DE.md create mode 100644 README_ES.md create mode 100644 README_FR.md create mode 100644 README_HE.md create mode 100644 README_HU.md create mode 100644 README_IT.md create mode 100644 README_JA.md create mode 100644 README_KOR.md create mode 100644 README_PL.md create mode 100644 README_PTBR.md create mode 100644 README_RS.md create mode 100644 README_RU.md create mode 100644 README_TG.md create mode 100644 README_TH.md create mode 100644 README_TR.md create mode 100644 README_VI.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000..5875086110 --- /dev/null +++ b/README.md @@ -0,0 +1,150 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [Documentation](https://elizaos.github.io/eliza/) | 🎯 [Examples](https://github.com/thejoven/awesome-eliza) + +
+ +## 🌍 README Translations + +[中文说明](./README_CN.md) | [日本語の説明](./README_JA.md) | [한국어 설명](./README_KOR.md) | [Français](./README_FR.md) | [Português](./README_PTBR.md) | [Türkçe](./README_TR.md) | [Русский](./README_RU.md) | [Español](./README_ES.md) | [Italiano](./README_IT.md) | [ไทย](./README_TH.md) | [Deutsch](./README_DE.md) | [Tiếng Việt](./README_VI.md) | [עִברִית](https://github.com/elizaos/Elisa/blob/main/README_HE.md) | [Tagalog](./README_TG.md) | [Polski](./README_PL.md) | [Arabic](./README_AR.md) | [Hungarian](./README_HU.md) | [Srpski](./README_RS.md) + +## 🚩 Overview + +
+ Eliza Diagram +
+ +## ✨ Features + +- 🛠️ Full-featured Discord, Twitter and Telegram connectors +- 🔗 Support for every model (Llama, Grok, OpenAI, Anthropic, etc.) +- 👥 Multi-agent and room support +- 📚 Easily ingest and interact with your documents +- 💾 Retrievable memory and document store +- 🚀 Highly extensible - create your own actions and clients +- ☁️ Supports many models (local Llama, OpenAI, Anthropic, Groq, etc.) +- 📦 Just works! + +## Video Tutorials + +[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL) + +## 🎯 Use Cases + +- 🤖 Chatbots +- 🕵️ Autonomous Agents +- 📈 Business Process Handling +- 🎮 Video Game NPCs +- 🧠 Trading + +## 🚀 Quick Start + +### Prerequisites + +- [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) + +> **Note for Windows Users:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) is required. + +### Use the Starter (Recommended) + +```bash +git clone https://github.com/elizaos/eliza-starter.git +cd eliza-starter +cp .env.example .env +pnpm i && pnpm build && pnpm start +``` + +Once the agent is running, you should see the message to run "pnpm start:client" at the end. +Open another terminal and move to same directory and then run below command and follow the URL to chat to your agent. + +```bash +pnpm start:client +``` + +Then read the [Documentation](https://elizaos.github.io/eliza/) to learn how to customize your Eliza. + +### Manually Start Eliza (Only recommended if you know what you are doing) + +```bash +# Clone the repository +git clone https://github.com/elizaos/eliza.git + +# Checkout the latest release +# This project iterates fast, so we recommend checking out the latest release +git checkout $(git describe --tags --abbrev=0) +``` + +### Start Eliza with Gitpod + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### Edit the .env file + +Copy .env.example to .env and fill in the appropriate values. + +``` +cp .env.example .env +``` + +Note: .env is optional. If you're planning to run multiple distinct agents, you can pass secrets through the character JSON +Note: .env is optional. If you're planning to run multiple distinct agents, you can pass secrets through the character JSON + +### Automatically Start Eliza + +This will run everything to set up the project and start the bot with the default character. + +```bash +sh scripts/start.sh +``` + +### Edit the character file + +1. Open `packages/core/src/defaultCharacter.ts` to modify the default character. Uncomment and edit. + +2. To load custom characters: + - Use `pnpm start --characters="path/to/your/character.json"` + - Multiple character files can be loaded simultaneously +3. Connect with X (Twitter) + - change `"clients": []` to `"clients": ["twitter"]` in the character file to connect with X + +### Manually Start Eliza + +```bash +pnpm i +pnpm build +pnpm start + +# The project iterates fast, sometimes you need to clean the project if you are coming back to the project +pnpm clean +``` + +#### Additional Requirements + +You may need to install Sharp. If you see an error when starting up, try installing it with the following command: + +``` +pnpm install --include=optional sharp +``` + +### Community & contact + +- [GitHub Issues](https://github.com/elizaos/eliza/issues). Best for: bugs you encounter using Eliza, and feature proposals. +- [Discord](https://discord.gg/ai16z). Best for: sharing your applications and hanging out with the community. + +## Contributors + + + + + +## Star History + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_AR.md b/README_AR.md new file mode 100644 index 0000000000..c2597ebf7b --- /dev/null +++ b/README_AR.md @@ -0,0 +1,133 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [التعليمات](https://elizaos.github.io/eliza/) | 🎯 [الأمثلة](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ ما هي الميزات؟ + +- 🛠️ اتصالات مجهزة بالكامل لديسكورد، تويتر، وتيليغرام. +- 👥 دعم متعدد للوكلاء والغرف. +- 📚 التفاعل بإتقان مع المستندات كما يمكن فحصها بسهولة. +- 💾 ذاكرة قوية قابلة لاسترجاع ما فاتك! وكذلك مساحة كافية للتخزين +- 🚀 سريعة الانتشار بشكل غير مسبوق، هيّا! تفاعل واصنع عملاء خاصين بك. +- ☁️ تدعم العديد من النماذج مثل:- + - لاما (نموذج مفتوح المصدر للذكاء الاصطناعي Llama). + - جروك (نظام ذكاء اصطناعي متقدم Grok). + - أوبن إيه آي (OpenAI نماذج ذكاء اصطناعي مثل ChatGPT). + - أنثروبيك Anthropic وغيرها من النماذج الأخرى! +- 📦 جاهزة للعمل أي وقت وبسهولة! + +## 🎯 كيف ستفيدني؟ + +- 🤖 روبوتات الدردشة. +- 🕵️ وكلاء مستقلون. +- 📈 إدارة الأعمال. +- 🎮 في الجيميز NPCs أو الشخصيات التي يتحكم بها الحاسوب فقط وليس اللاعب. +- 🧠 التداول. + +## 🚀 ابدأ الآن! + +### ماذا عن المتطلبات الأساسية؟ + +- [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) + +> **لمتسخدمي الويندوز يجب أن يكون لديك نظام ويندوز الفرعي للينكس:** [WSL 2](https://learn.microsoft.com/de-de/windows/wsl/install-manual). + +### استخدام النسخة المبدئية (موصى به) + +```bash +git clone https://github.com/elizaos/eliza-starter.git + +cp .env.example .env + +pnpm i && pnpm start +``` + +تعلم أكثر عن كيفية تخصيص إليزا من هنا [التعليمات](https://elizaos.github.io/eliza/) + +### إذا كان لديك خبرة بالفعل، يُمكنك تشغيل إليزا يدويًا. + +```bash +# انشئ نسخة +git clone https://github.com/elizaos/eliza.git + +# ألق نظرة على آخر تحديث +# هذا المشروع يتطور بسرعة، لذا، أوصيك باستخدام أحدث إصدار +git checkout $(git describe --tags --abbrev=0) +``` + +### تشغل إليزا مع Gitpod + +[![In Gitpod öffnen](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### عدّل ملف .env-Datei + +انسخ ملف .env.example إلى .env واملأ القيم المناسبة. + +``` +cp .env.example .env +``` + +ضع في الإعتبار أن ملف .env اختياري. إذا كنت تخطط لتشغيل عدة وكلاء مختلفين، ابعت الـsecrets من خلال ملف JSON الخاص بالشخصية. + +### تشغيل إليزا تلقائيًا + +هذا الكود لتنفيذ جميع الخطوات اللازمة لإعداد المشروع وكذلك تشغيل الروبوت مع الشخصية الافتراضية. + +```bash +sh scripts/start.sh +``` + +### لتعديل ملف الشخصية + +افتح ملف agent/src/character.ts لتعديل الشخصية الافتراضية. قم بإلغاء التعليق وعدّل عليها. + +لتحميل شخصيات مخصصة + - استخدم الأمر "pnpm start --characters="path/to/your/character.json + - يُمكنك تحميل عدة ملفات للشخصيات في نفس الوقت. + +الاتصال بـ X (تويتر): + - غيّر "clients": [] إلى "clients": ["twitter"] في ملف الشخصية للاتصال بـ X أو تويتر + +### لتشغيل إليزا يدويًا + +```bash +pnpm i +pnpm build +pnpm start + +# المشروع يتطور سريعًا. لذا قد تحتاج إلى تنظيف المشروع إذا قمت بالرجوع إليه بعد فترة. +pnpm clean +``` + +#### المتطلبات الإضافية + +قد تحتاج إلى تثبيت Sharp. إذا واجهت خطأ أثناء بدء التشغيل، جرب استخدام الأمر التالي: + +``` +pnpm install --include=optional sharp +``` + +### المجتمع والدعم + +- في حال إذا واجهت أي مشاكل تتعلق باستخدام إليزا ولتقديم المقترحات [GitHub Issues](https://github.com/elizaos/eliza/issues). +- لمشاركة تطبيقاتك والتفاعل مع المجتمع [Discord](https://discord.gg/ai16z). + +## المُساهمون + + + + + +## تاريخ النجوم + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_DE.md b/README_DE.md new file mode 100644 index 0000000000..c1bf8b4b25 --- /dev/null +++ b/README_DE.md @@ -0,0 +1,128 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [Dokumentation](https://elizaos.github.io/eliza/) | 🎯 [Beispiele](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ Funktionen + +- 🛠️ Voll ausgestattete Konnektoren für Discord, Twitter und Telegram +- 👥 Multi-Agenten- und Raumunterstützung +- 📚 Einfache Verarbeitung und Interaktion mit deinen Dokumenten +- 💾 Abrufbarer Speicher und Dokumentenspeicher +- 🚀 Hochgradig erweiterbar – erstelle deine eigenen Aktionen und Clients +- ☁️ Unterstützt viele Modelle (lokales Llama, OpenAI, Anthropic, Groq usw.) +- 📦 Einfach funktionsfähig! + +## 🎯 Anwendungsfälle + +- 🤖 Chatbots +- 🕵️ Autonome Agenten +- 📈 Geschäftsprozessmanagement +- 🎮 NPCs in Videospielen +- 🧠 Handel + +## 🚀 Schnelleinstieg + +### Voraussetzungen + +- [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) + +> **Hinweis für Windows-Benutzer:** [WSL 2](https://learn.microsoft.com/de-de/windows/wsl/install-manual) ist erforderlich. + +### Nutzung des Starters (Empfohlen) + +```bash +git clone https://github.com/elizaos/eliza-starter.git + +cp .env.example .env + +pnpm i && pnpm start +``` + +Lies dann die [Dokumentation](https://elizaos.github.io/eliza/), um zu erfahren, wie du Eliza anpassen kannst. + +### Manuelles Starten von Eliza (Nur empfohlen, wenn du genau weißt, was du tust) + +```bash +# Repository klonen +git clone https://github.com/elizaos/eliza.git + +# Wechsle zur neuesten Version +# Dieses Projekt entwickelt sich schnell weiter, daher empfehlen wir, die neueste Version zu verwenden +git checkout $(git describe --tags --abbrev=0) +``` + +### Eliza mit Gitpod starten + +[![In Gitpod öffnen](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### Bearbeite die .env-Datei + +Kopiere .env.example nach .env und fülle die entsprechenden Werte aus. + +``` +cp .env.example .env +``` + +Hinweis: .env ist optional. Wenn du vorhast, mehrere unterschiedliche Agenten auszuführen, kannst du Geheimnisse über die Charakter-JSON übergeben. + +### Eliza automatisch starten + +Dies führt alle notwendigen Schritte aus, um das Projekt einzurichten und den Bot mit dem Standardcharakter zu starten. + +```bash +sh scripts/start.sh +``` + +### Charakterdatei bearbeiten + +1. Öffne `agent/src/character.ts`, um den Standardcharakter zu bearbeiten. Kommentiere und bearbeite ihn. + +2. Um benutzerdefinierte Charaktere zu laden: + - Verwende `pnpm start --characters="path/to/your/character.json"` + - Mehrere Charakterdateien können gleichzeitig geladen werden. +3. Verbinde mit X (Twitter) + - Ändere `"clients": []` zu `"clients": ["twitter"]` in der Charakterdatei, um eine Verbindung mit X herzustellen. + +### Eliza manuell starten + +```bash +pnpm i +pnpm build +pnpm start + +# Das Projekt entwickelt sich schnell weiter. Manchmal musst du das Projekt bereinigen, wenn du es nach einiger Zeit erneut aufrufst. +pnpm clean +``` + +#### Zusätzliche Anforderungen + +Möglicherweise musst du Sharp installieren. Wenn beim Starten ein Fehler auftritt, versuche es mit folgendem Befehl: + +``` +pnpm install --include=optional sharp +``` + +### Community & Kontakt + +- [GitHub Issues](https://github.com/elizaos/eliza/issues). Am besten geeignet für: Bugs, die du bei der Nutzung von Eliza findest, und Feature-Vorschläge. +- [Discord](https://discord.gg/ai16z). Am besten geeignet für: das Teilen deiner Anwendungen und den Austausch mit der Community. + +## Contributors + + + + + +## Star History + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_ES.md b/README_ES.md new file mode 100644 index 0000000000..17156e094c --- /dev/null +++ b/README_ES.md @@ -0,0 +1,181 @@ +# Eliza + +Banner de Eliza + +## Funcionalidades + +- 🛠 Conectores completos para Discord, Twitter y Telegram +- 👥 Soporte para múltiples agentes y salas +- 📚 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, incluidos Llama local, OpenAI, Anthropic, Groq y más +- 📦 Funciona perfectamente + +## Usos + +- 🤖 Chatbots +- 🕵️ Agentes autónomos +- 📈 Gestión de procesos empresariales +- 🎮 NPCs en videojuegos + +# Primeros Pasos + +**Requisitos (OBLIGATORIOS):** + +- [Python 2.7+](https://www.python.org/downloads/) +- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [pnpm](https://pnpm.io/installation) + +### Edite el archivo .env + +- 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 + +- Revise el archivo `src/core/defaultCharacter.ts` - puede modificarlo +- También puede cargar personajes con el comando `pnpm start --characters="path/to/your/character.json"` y ejecutar múltiples bots simultáneamente. + +Después de configurar el archivo .env y el archivo de personaje, puede iniciar el bot con: + +``` +pnpm i +pnpm start +``` + +# Personalizando a Eliza + +### Agregando acciones personalizadas + +Para evitar conflictos en el directorio central, se recomienda agregar acciones personalizadas a un directorio `custom_actions` y luego agregarlas al archivo `elizaConfig.yaml`. Consulte el archivo `elizaConfig.example.yaml` para un ejemplo. + +## Ejecución con Diferentes Modelos + +### Ejecutar con Llama + +Puede ejecutar modelos Llama 70B o 405B configurando la variable de ambiente `XAI_MODEL` en `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` o `meta-llama/Meta-Llama-3.1-405B-Instruct` + +### Ejecutar con Grok + +Puede ejecutar modelos Grok configurando la variable de ambiente `XAI_MODEL` en `grok-beta` + +### Ejecutar con OpenAI + +Puede ejecutar modelos OpenAI configurando la variable de ambiente `XAI_MODEL` en `gpt-4o-mini` o `gpt-4o` + +## Requisitos Adicionales + +Puede ser necesario instalar Sharp. Si encuentra un error al iniciar, intente instalarlo con: + +``` +pnpm install --include=optional sharp +``` + +# Configuración del Entorno + +Deberá agregar variables de ambiente a su archivo .env para conectarse a varias plataformas: + +``` +# Variables de ambiente obligatorias +DISCORD_APPLICATION_ID= +DISCORD_API_TOKEN= # Token del bot +OPENAI_API_KEY=sk-* # Clave API de OpenAI, comenzando con sk- +ELEVENLABS_XI_API_KEY= # Clave API de ElevenLabs +GOOGLE_GENERATIVE_AI_API_KEY= # Clave API de Gemini + +# CONFIGURACIONES DE ELEVENLABS +ELEVENLABS_MODEL_ID=eleven_multilingual_v2 +ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM +ELEVENLABS_VOICE_STABILITY=0.5 +ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 +ELEVENLABS_VOICE_STYLE=0.66 +ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false +ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 +ELEVENLABS_OUTPUT_FORMAT=pcm_16000 + +TWITTER_DRY_RUN=false +TWITTER_USERNAME= # Nombre de usuario de la cuenta +TWITTER_PASSWORD= # Contraseña de la cuenta +TWITTER_EMAIL= # Correo electrónico de la cuenta + +X_SERVER_URL= +XAI_API_KEY= +XAI_MODEL= + +# Para consultar a Claude +ANTHROPIC_API_KEY= + +# EVM +EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY + +# Solana +SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +# Fallback Wallet Configuration (deprecated) +WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +BIRDEYE_API_KEY= + +SOL_ADDRESS=So11111111111111111111111111111111111111112 +SLIPPAGE=1 +RPC_URL=https://api.mainnet-beta.solana.com +HELIUS_API_KEY= + +## Telegram +TELEGRAM_BOT_TOKEN= + +TOGETHER_API_KEY= +``` + +# Configuración de Inferencia Local + +### Configuración CUDA + +Si tiene una GPU NVIDIA, puede instalar CUDA para acelerar significativamente la inferencia local. + +``` +pnpm install +npx --no node-llama-cpp source download --gpu cuda +``` + +Asegúrese de tener instalado el CUDA Toolkit, incluyendo cuDNN y cuBLAS. + +### Ejecución local + +Agregue XAI_MODEL y configúrelo con una de las opciones de [Ejecutar con Llama](#ejecutar-con-llama) - puede dejar X_SERVER_URL y XAI_API_KEY en blanco, descargará el modelo de HuggingFace y realizará consultas localmente + +# Clientes + +## Bot de Discord + +Para ayuda con la configuración de su Bot de Discord, consulte: https://discordjs.guide/preparations/setting-up-a-bot-application.html + +# Desarrollo + +## Pruebas + +Para ejecutar la suite de pruebas: + +```bash +pnpm test # Ejecutar pruebas una vez +pnpm test:watch # Ejecutar pruebas en modo observación +``` + +Para pruebas específicas de base de datos: + +```bash +pnpm test:sqlite # Ejecutar pruebas con SQLite +pnpm test:sqljs # Ejecutar pruebas con SQL.js +``` + +Las pruebas están escritas con Jest y se pueden encontrar en archivos `src/**/*.test.ts`. El entorno de pruebas está configurado para: + +- Cargar variables de ambiente desde `.env.test` +- Usar un límite de 2 minutos para pruebas de larga duración +- Soportar módulos ESM +- Ejecutar pruebas en secuencia (--runInBand) + +Para crear nuevas pruebas, agregue un archivo `.test.ts` junto al código que está probando. diff --git a/README_FR.md b/README_FR.md new file mode 100644 index 0000000000..6f120c1f00 --- /dev/null +++ b/README_FR.md @@ -0,0 +1,84 @@ +# Eliza + +Eliza Banner + +## Fonctionnalités + +- 🛠 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 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 +- 📈 Processus automatisés +- 🎮 PNJ interactifs +- 🧠 Trading automatisé + +# Premiers pas + +**Pré-requis (obligatoire) :** + +- [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) + +> **Note pour Windows :** WSL est requis + +### Editer le fichier .env + +- Copier le fichier d'exemple .env.example et le remplir avec les valeurs adéquates + +``` +cp .env.example .env +``` + +### Modifier les fichiers personnage + +1. Ouvrir le document `src/core/defaultCharacter.ts` afin de modifier le personnage par défaut + +2. Pour ajouter des personnages personnalisés : + - Lancer la commande `pnpm start --characters="path/to/your/character.json"` + - Plusieurs fichiers personnages peuvent être ajoutés en même temps + +### Lancer Eliza + +Après avoir terminé la configuration et les fichiers personnage, lancer le bot en tapant la ligne de commande suivante: + +```bash +pnpm i +pnpm build +pnpm start + +# Le projet étant régulièrement mis à jour, il vous faudra parfois le nettoyer avant de recommencer à travailler dessus +pnpm clean +``` + +#### Ressources additionnelles + +Il vous faudra peut-être installer Sharp. +S'il y a une erreur lors du lancement du bot, essayez d'installer Sharp comme ceci : + +``` +pnpm install --include=optional sharp +``` + +### Communauté et réseaux sociaux + +- [GitHub](https://github.com/elizaos/eliza/issues). Pour partager les bugs découverts lors de l'utilisation d'Eliza, et proposer de nouvelles fonctionnalités. +- [Discord](https://discord.gg/ai16z). Pour partager ses applications et rencontrer la communauté. + +## Contributeurs + + + + + +## Historique d'étoiles + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_HE.md b/README_HE.md new file mode 100644 index 0000000000..c25f8e17be --- /dev/null +++ b/README_HE.md @@ -0,0 +1,194 @@ +
+ +# אלייזה 🤖 + +
+ אלייזה באנר +
+ +
+ +📖 [תיעוד](https://elizaos.github.io/eliza/) | 🎯 [דוגמאות](https://github.com/thejoven/awesome-eliza) + +
+ +
+ +[中文说明](https://github.com/elizaos/Elisa/blob/main/README_CN.md) | [日本語の説明](https://github.com/elizaos/Elisa/blob/main/README_JA.md) | [한국어 설명](https://github.com/elizaos/Elisa/blob/main/README_KOR.md) | [Français](https://github.com/elizaos/Elisa/blob/main/README_FR.md) | [Português](https://github.com/elizaos/Elisa/blob/main/README_PTBR.md) | [Türkçe](TR.md) | [Русский](https://github.com/elizaos/Elisa/blob/main/README_RU.md) | [Español](https://github.com/elizaos/Elisa/blob/main/README_ES.md) | [Italiano](https://github.com/elizaos/Elisa/blob/main/README_IT.md) | [ไทย](https://github.com/elizaos/Elisa/blob/main/README_TH.md) | [Deutsch](https://github.com/elizaos/Elisa/blob/main/README_DE.md) | [עִברִית](https://github.com/elizaos/Elisa/blob/main/README_HE.md) + +
+ +
+ +## ✨ תכונות + +- 🛠️ מחברים מלאים לדיסקורד, טוויטר וטלגרם +- 🔗 תמיכה בכל מודל (Llama, Grok, OpenAI, Anthropic, וכו') +- 👥 תמיכה בריבוי סוכנים וחדרים +- 📚 קל לשלב ולהשתמש במסמכים שלך +- 💾 זיכרון ומאגר מסמכים הניתנים לשליפה +- 🚀 ניתן להרחבה רבה - יצירת פעולות ולקוחות משלך +- ☁️ תומך בהרבה מודלים (local Llama, OpenAI, Anthropic, Groq , + וכו') +- 📦 פשוט עובד! + +
+ +## 🎯 מקרי שימוש + +
+- 🤖 צ'טבוטים +
+
+- 🕵️ סוכנים אוטונומיים +
+
+- 📈 טיפול בתהליכים עסקיים +
+
+- 🎮 במשחקי וידאו (NPCs) +
+
+- 🧠 מסחר +
+ +## 🚀 התחלה מהירה + +
+ +### דרישות מוקדמות + +[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) - + +> **הערה למשתמשי Windows:** נדרש [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) + +
+ +### שימוש ב-Starter (מומלץ) + +
+ +``` +git clone https://github.com/elizaos/eliza-starter.git + +cp .env.example .env + +pnpm i && pnpm start +``` + +
+ +לאחר מכן קרא את [התיעוד](https://elizaos.github.io/eliza/) כדי ללמוד כיצד להתאים את אלייזה. + +### התחלה ידנית של אלייזה (מומלץ רק למי שיודע מה הוא עושה) + +
+ +``` +# שכפול המאגר +git clone https://github.com/elizaos/eliza.git + +# מעבר לגרסה האחרונה +git checkout $(git describe --tags --abbrev=0) +``` + +
+ +### התחלת אלייזה עם Gitpod + +
+ +[![פתח ב-Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +
+ +### עריכת קובץ .env + +
+ +העתק את .env.example ל-.env ומלא את הערכים המתאימים. + +``` +cp .env.example .env +``` + +
+ +הערה: .env הוא אופציונלי. אם אתם מתכננים להפעיל מספר סוכנים נפרדים, ניתן להעביר סודות דרך JSON הדמות. + +### התחלה אוטומטית של אלייזה + +פעולה זו תפעיל הכל כדי להגדיר את הפרויקט ולהתחיל את הבוט עם הדמות המובנית. + +
+ +```bash +sh scripts/start.sh +``` + +
+ +### עריכת קובץ הדמות + +1. פתח את `agent/src/character.ts` כדי לשנות את דמות ברירת המחדל. בטל הערה וערוך. + +2. לטעינת דמויות מותאמות אישית: + + - השתמש ב-`pnpm start --characters="path/to/your/character.json"` + - ניתן לטעון מספר קבצי דמויות בו זמנית. + +3. התחבר עם X (טוויטר): + - שנה `"clients": []` ל-`"clients": ["twitter"]` בקובץ הדמות כדי להתחבר ל-X. + +### התחלה ידנית של אלייזה + +
+ +```bash +pnpm i +pnpm build +pnpm start + +# לעיתים צריך לנקות את הפרויקט אם חוזרים אליו לאחר זמן +pnpm clean +``` + +
+ +#### דרישות נוספות + +ייתכן שתצטרך להתקין את Sharp. אם אתה רואה שגיאה בעת ההפעלה, נסה להתקין עם הפקודה הבאה: + +``` +pnpm install --include=optional sharp +``` + +### קהילה ויצירת קשר + +
+ +[GitHub Issues](https://github.com/elizaos/eliza/issues) מתאים ביותר עבור: באגים ופרופוזיציות לתכונות - + +[Discord](https://discord.gg/ai16z) מתאים ביותר עבור: שיתוף היישומים שלך והשתתפות בקהילה - + +
+ +## תורמים + + + + + + + + + +## היסטוריית כוכבים + +[![תרשים היסטוריית כוכבים](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) + +
diff --git a/README_HU.md b/README_HU.md new file mode 100644 index 0000000000..a4f73f2d72 --- /dev/null +++ b/README_HU.md @@ -0,0 +1,133 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [Dokumentáció](https://elizaos.github.io/eliza/) | 🎯 [Példák](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ Funkciók + +- 🛠️ Teljes funkcionalitású Discord, Twitter és Telegram összekötők +- 🔗 Támogatás minden modellhez (Llama, Grok, OpenAI, Anthropic, etc.) +- 👥 Többügynök és szobatámogatás +- 📚 Könnyen feldolgozhatja és kezelheti dokumentumait +- 💾 Helyrehozható memória és dokumentumtár +- 🚀 Magas fokú bővíthetőség - hozz létre saját műveleteket és klienseket +- ☁️ Számos modell támogatása (helyi Llama, OpenAI, Anthropic, Groq stb.) +- 📦 Egyszerűen működik! + +## 🎯 Felhasználási területek + +- 🤖 Chatbotok +- 🕵️ Autonóm ügynökök +- 📈 Üzleti folyamatkezelés +- 🎮 Videójáték NPC-k +- 🧠 Kereskedés + +## 🚀 Gyors kezdés + +### Előfeltételek + +- [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) + +> **Megjegyzés Windows-felhasználóknak:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) szükséges. + +### Használja az Indítót (Ajánlott) + +```bash +git clone https://github.com/elizaos/eliza-starter.git +cd eliza-starter +cp .env.example .env +pnpm i && pnpm build && pnpm start +``` +Miután az ügynök elindult, a folyamat végén egy üzenetet kell látnod, amely arra utal, hogy futtasd a "pnpm start:client" parancsot. +Nyiss egy másik terminált, navigálj ugyanabba a könyvtárba, és futtasd az alábbi parancsot, majd kövesd az URL-t, hogy kommunikálhass az ügynököddel: +```bash +pnpm start:client +``` + +Ezután olvasd el a [Dokumentációt](https://elizaos.github.io/eliza/) hogy megtanuld, hogyan testreszabhatod Elizát. + +### Eliza manuális indítása (Csak akkor ajánlott, ha pontosan tudod, mit csinálsz) + +```bash +# Klónozd a repót +git clone https://github.com/elizaos/eliza.git + +# Válts a legfrissebb kiadásra +# A projekt gyorsan fejlődik, ezért ajánlott a legfrissebb kiadásra váltani +git checkout $(git describe --tags --abbrev=0) +``` + +### Eliza indítása Gitpoddal + +[![Megnyitás Gitpodban](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### Szerkezd a .env fájlt + +Másold a .env.example fájlt .env néven, és töltsd ki a megfelelő értékekkel. + +``` +cp .env.example .env +``` + +Megjegyzés: A .env fájl opcionális. Ha több különálló ügynököt szeretnél futtatni, a titkos adatokat a karakter JSON-on keresztül is megadhatod. + +### Eliza automatikus indítása + +Ez a parancs mindent beállít a projekthez, és elindítja a botot az alapértelmezett karakterrel. + +```bash +sh scripts/start.sh +``` + +### Karakterfájl szerkesztése +`` +1. Nyisd meg a `packages/core/src/defaultCharacter.ts` fájlt, hogy módosítsd az alapértelmezett karaktert. Kommentezd ki és szerkeszd. + +2. Egyedi karakterek betöltése: + - Használhatod a következőt: `pnpm start --characters="path/to/your/character.json"` + - Több karakterfájl is betölthető egyszerre. +3. Kapcsolódás X-hez (Twitter) + - Módosítsd a `"clients": []` részt `"clients": ["twitter"]` -re a karakterfájlban, hogy csatlakozz az X-hez + +### Eliza manuális indítása + +```bash +pnpm i +pnpm build +pnpm start + +# A projekt gyorsan fejlődik. Néha meg kell tisztítania a projektet, amikor egy idő után újra visszatérsz. +pnpm clean +``` + +#### További követelmények + +Előfordulhat, hogy telepítened kell a Sharpot. Ha hibát látsz az indításkor, próbáld meg telepíteni az alábbi paranccsal: + +``` +pnpm install --include=optional sharp +``` + +### Közösség és kapcsolattartás + +- [GitHub Issues](https://github.com/elizaos/eliza/issues). Ideális hibák jelentésére és új funkciók javaslatára. +- [Discord](https://discord.gg/ai16z). BTökéletes hely az alkalmazásaid megosztására és a közösséggel való kapcsolatépítésre. + +## Közreműködők + + + + + +## Star History + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_IT.md b/README_IT.md new file mode 100644 index 0000000000..06bd7365fb --- /dev/null +++ b/README_IT.md @@ -0,0 +1,92 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +## ✨ Caratteristiche + +- 🛠️ Connettori completi per Discord, Twitter e Telegram +- 🔗 Supporto per tutti i modelli (Llama, Grok, OpenAI, Anthropic, ecc.) +- 👥 Supporto multi-agente e per stanze +- 📚 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 + +- 🤖 Chatbot +- 🕵️ Agenti Autonomi +- 📈 Gestione dei processi aziendali +- 🎮 NPC per Videogiochi +- 🧠 Trading + +## 🚀 Avvio Rapido + +### Prerequisiti + +- [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) + +> **Nota per gli utenti Windows:** È richiesto WSL + +### Modifica il file .env + +Copia .env.example in .env e inserisci i valori appropriati + +``` +cp .env.example .env +``` + +### Avvia Eliza Automaticamente + +Questo script eseguirà tutti i comandi necessari per configurare il progetto e avviare il bot con il personaggio predefinito. + +```bash +sh scripts/start.sh +``` + +### Modifica il file del personaggio + +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"` + - È possibile caricare più file di personaggi contemporaneamente + +### Avvia Eliza Manualmente + +```bash +pnpm i +pnpm build +pnpm start + +# Il progetto evolve rapidamente; a volte è necessario pulire il progetto se si ritorna sul progetto dopo un po' di tempo +pnpm clean +``` + +#### Requisiti Aggiuntivi + +Potrebbe essere necessario installare Sharp. Se vedi un errore all'avvio, prova a installarlo con il seguente comando: + +``` +pnpm install --include=optional sharp +``` + +### Comunità e contatti + +- [GitHub Issues](https://github.com/elizaos/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 + + + + + +## Cronologia Stelle + +[![Grafico Cronologia Stelle](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_JA.md b/README_JA.md new file mode 100644 index 0000000000..dea9a32e27 --- /dev/null +++ b/README_JA.md @@ -0,0 +1,181 @@ +# Eliza + +Eliza Banner + +## 機能 + +- 🛠 Discord、Twitter、Telegramのフル機能コネクタ +- 👥 マルチエージェントおよびルームサポート +- 📚 ドキュメントの簡単な取り込みと対話 +- 💾 検索可能なメモリおよびドキュメントストア +- 🚀 高い拡張性 - 機能を拡張するための独自のアクションとクライアントを作成可能 +- ☁️ Llama、OpenAI、Anthropic、Groqなど、多くのモデルをサポート +- 📦 すぐに使える! + +## 何に使えるのか? + +- 🤖 チャットボット +- 🕵️ 自律エージェント +- 📈 ビジネスプロセスの処理 +- 🎮 ビデオゲームのNPC + +# 始め方 + +**必須条件:** + +- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [pnpm](https://pnpm.io/installation) + +### .envファイルの編集 + +- .env.exampleを.envにコピーし、適切な値を入力 +- TWITTER環境変数を編集して、ボットのユーザー名とパスワードを追加 + +### キャラクターファイルの編集 + +- `src/core/defaultCharacter.ts`ファイルを確認 - これを変更可能 +- `pnpm start --characters="path/to/your/character.json"`を使用してキャラクターをロードし、複数のボットを同時に実行可能 + +.envファイルとキャラクターファイルを設定した後、以下のコマンドでボットを起動可能: + +``` +pnpm i +pnpm start +``` + +# Elizaのカスタマイズ + +### カスタムアクションの追加 + +コアディレクトリでのGitの競合を避けるために、カスタムアクションを`custom_actions`ディレクトリに追加し、それを`elizaConfig.yaml`ファイルに追加することをお勧めします。例については`elizaConfig.example.yaml`ファイルを参照してください。 + +## 異なるモデルでの実行 + +### Llamaでの実行 + +`XAI_MODEL`環境変数を`meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`または`meta-llama/Meta-Llama-3.1-405B-Instruct`に設定することで、Llama 70Bまたは405Bモデルを実行可能 + +### Grokでの実行 + +`XAI_MODEL`環境変数を`grok-beta`に設定することで、Grokモデルを実行可能 + +### OpenAIでの実行 + +`XAI_MODEL`環境変数を`gpt-4o-mini`または`gpt-4o`に設定することで、OpenAIモデルを実行可能 + +## 追加の要件 + +Sharpをインストールする必要があるかもしれません。起動時にエラーが表示された場合は、以下のコマンドでインストールを試みてください: + +``` +pnpm install --include=optional sharp +``` + +# 環境設定 + +���まざまなプラットフォームに接続するために、.envファイルに環境変数を追加する必要があります: + +``` +# 必須環境変数 +DISCORD_APPLICATION_ID= +DISCORD_API_TOKEN= # ボットトークン +OPENAI_API_KEY=sk-* # OpenAI APIキー、sk-で始まる +ELEVENLABS_XI_API_KEY= # elevenlabsからのAPIキー + +# ELEVENLABS設定 +ELEVENLABS_MODEL_ID=eleven_multilingual_v2 +ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM +ELEVENLABS_VOICE_STABILITY=0.5 +ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 +ELEVENLABS_VOICE_STYLE=0.66 +ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false +ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 +ELEVENLABS_OUTPUT_FORMAT=pcm_16000 + +TWITTER_DRY_RUN=false +TWITTER_USERNAME= # アカウントのユーザー名 +TWITTER_PASSWORD= # アカウントのパスワード +TWITTER_EMAIL= # アカウントのメール + +X_SERVER_URL= +XAI_API_KEY= +XAI_MODEL= + + +# Claudeに質問するため +ANTHROPIC_API_KEY= + +# EVM +EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY + +# Solana +SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +# Fallback Wallet Configuration (deprecated) +WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +BIRDEYE_API_KEY= + +SOL_ADDRESS=So11111111111111111111111111111111111111112 +SLIPPAGE=1 +RPC_URL=https://api.mainnet-beta.solana.com +HELIUS_API_KEY= + + +## Telegram +TELEGRAM_BOT_TOKEN= + +TOGETHER_API_KEY= +``` + +# ローカル推論設定 + +### CUDA設定 + +NVIDIA GPUを持っている場合、CUDAをインストールしてローカル推論を大幅に高速化可能 + +``` +pnpm install +npx --no node-llama-cpp source download --gpu cuda +``` + +CUDA Toolkit、cuDNN、cuBLASをインストールしていることを確認してください。 + +### ローカルでの実行 + +XAI_MODELを追加し、[Llamaでの実行](#run-with-llama)のオプションのいずれかに設定 - X_SERVER_URLとXAI_API_KEYを空白のままにしておくと、huggingfaceからモデルをダウンロードし、ローカルでクエリを実行します。 + +# クライアント + +## Discordボット + +Discordボットの設定に関するヘルプについては、こちらを参照してください: https://discordjs.guide/preparations/setting-up-a-bot-application.html + +# 開発 + +## テスト + +テストスイートを実行するには: + +```bash +pnpm test # テストを一度実行 +pnpm test:watch # ウォッチモードでテストを実行 +``` + +データベース固有のテストの場合: + +```bash +pnpm test:sqlite # SQLiteでテストを実行 +pnpm test:sqljs # SQL.jsでテストを実行 +``` + +テストはJestを使用して記述されており、`src/**/*.test.ts`ファイルにあります。テスト環境は次のように構成されています: + +- `.env.test`から環境変数をロード +- 長時間実行されるテストのために2分のタイムアウトを使用 +- ESMモジュールをサポート +- テストを順番に実行 (--runInBand) + +新しいテストを作成するには、テストするコードの隣に`.test.ts`ファイルを追加します。 diff --git a/README_KOR.md b/README_KOR.md new file mode 100644 index 0000000000..6e643e67d0 --- /dev/null +++ b/README_KOR.md @@ -0,0 +1,129 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [문서](https://elizaos.github.io/eliza/) | 🎯 [예시](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ 기능 + +- 🛠 SNS 지원: 디스코드, 트위터, 텔레그램 연동 지원 +- 🔗 다양한 모델 지원 (Llama, Grok, OpenAI, Anthropic 등) +- 👥 다중 지원: 다중 에이전트 및 채팅방 지원 +- 📚 높은 유연성: 데이터를 쉽게 추가하고 다양한 상호작용 가능 +- 💾 검색 지원: 데이터와 작업을 쉽게 찾아볼 수 있도록 검색 기능 지원 +- 🚀 높은 확장성: 사용자 정의 동작 및 클라이언트 생성 가능 +- ☁️ 다양한 AI 모델 지원: local Llama, OpenAI, Anthropic, Groq 등 다양한 AI 모델을 지원합니다 +- 📦 즐겁게 개발해 봐요! + +## 🎯 사용 사례 + +- 🤖 챗봇 +- 🕵 ️자율 에이전트 +- 📈 자동화 프로세스 +- 🎮 비디오 게임 NPC +- 🧠 트레이딩 + +## 🚀 빠른 시작 + +### 필수 요구사항: + +- [Python 2.7+](https://www.python.org/downloads/) +- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [pnpm](https://pnpm.io/installation) + +> **Windows 사용자 참고:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) 필요. + +### Starter 사용 (권장) + +```bash +git clone https://github.com/elizaos/eliza-starter.git + +cp .env.example .env + +pnpm i && pnpm start +``` + +[문서](https://elizaos.github.io/eliza/)를 참고하여 Eliza를 커스마이징 방법을 확인하세요. + +### 수동으로 실행 (사용법을 알고 있는 경우에만 권장) + +```bash +# 저장소 복사 +git clone https://github.com/elizaos/eliza.git + +# 최신 릴리스로 체크아웃 +# 프로젝트가 빠르게 수정되므로 최신 릴리스를 체크아웃하는 것을 권장합니다. +git checkout $(git describe --tags --abbrev=0) +``` + +### Gitpod로 Eliza 시작 + +[![Gitpod로 열기](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### .env 파일 편집 + +.env.example을 복사해서 필요한 값들을 채워넣어 .env파일을 만드세요. + +``` +cp .env.example .env +``` + +참고: .env는 선택 사항입니다. 여러 개의 에이전트를 실행하려는 경우, 캐릭터 JSON 파일을 통해 비밀 변수를 전달할 수 있습니다. + +### Eliza 자동 시작 + +아래 명령은 프로젝트를 설정하고 기본 캐릭터와 함께 봇을 시작합니다. + +```bash +sh scripts/start.sh +``` + +### character file 편집 + +1. `agent/src/character.ts`를 열어 기본 캐릭터를 수정하세요. 주석을 해제하고 수정하시면 됩니다. + +2. 커스텀 캐릭터 로드하기: + - `pnpm start --characters="path/to/your/character.json"`을 사용합니다. + - 여러 캐릭터 파일을 동시에 로드할 수 있습니다. +3. X (Twitter) 연결: + - 캐릭터 파일에서 `"clients": []`를 `"clients": ["twitter"]`로 변경합니다. + +### Eliza 수동 시작 + +```bash +pnpm i +pnpm build +pnpm start + +# 프로젝트가 빠르게 수정되므로 프로젝트를 clean해야 할 수도 있습니다. +pnpm clean +``` + +#### 추가 요구 사항 + +시작 시 에러가 발생하면 Sharp를 설치해야 할 수 있습니다. 아래 명령어를 사용하여 설치하세요: + +``` +pnpm install --include=optional sharp +``` + +### 커뮤니티 & 문의 + +- [Github Issues](https://github.com/elizaos/eliza/issues). 용도: Eliza 사용 중 발견된 버그 리포트, 기능 제안. +- [Discord](https://discord.gg/ai16z). 용도: 애플리케이션 공유 및 커뮤니티 활동. + +## 기여자 + + + + + +## 스타 기록 + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) \ No newline at end of file diff --git a/README_PL.md b/README_PL.md new file mode 100644 index 0000000000..5c927e4dc9 --- /dev/null +++ b/README_PL.md @@ -0,0 +1,137 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [Dokumentacja](https://elizaos.github.io/eliza/) | 🎯 [Przykłady](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ Cechy modelu: + +- 🛠️ Pełne wsparcie dla Discorda, Telegrama i Twittera +- 🔗 Wsparcie dla wszystkich modeli AI (Llama, Grok, OpenAI, Anthropic, itd.) +- 👥 Wiele osobowości jednocześnie oraz wsparcie dla pokoi +- 📚 Prosta konstrukcja i łatwość modyfikacji ustawień +- 💾 Przywracalna pamięć i opcja przechowywania dokumentów +- 🚀 Wiele możliwości rozszerzeń - twórz własne klienty, aplikacje itd +- ☁️ Wsparcie dla szerokiej gamy modeli (local Llama, OpenAI, Anthropic, Groq, etc.) +- 📦 To po prostu działa! + +## Poradniki wideo + +[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL) + +## 🎯 Przykłady zastosowania + +- 🤖 Chatboty +- 🕵️ Autonomiczni Agenci +- 📈 Utrzymanie procesów biznesowych +- 🎮 Zaplecze dla postaci NPC w grach +- 🧠 Handel + +## 🚀 Jak zacząć? + +### Wstępne wymagania: + +- [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) + +> **Notka dla użytkowników Windowsa:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) jest wymagane!. + +### Użycie startera (Rekomendowane) + +```bash +git clone https://github.com/elizaos/eliza-starter.git +cd eliza-starter +cp .env.example .env +pnpm i && pnpm build && pnpm start +``` +Gdy agent się uruchomi, powinien pojawić się komunikat aby uruchomić komendę "pnpm start:client". +Wtedy trzeba odpalić drugi terminal, przejść do tego samego folderu, w którym mamy sklonowany kod z Githuba i odpalić tą komendę, aby być w stanie rozpocząć konwersację z naszym botem. +```bash +pnpm start:client +``` + +Następnie zapoznaj się z [Dokumentacją](https://elizaos.github.io/eliza/). Tam jest szcegółowo opisane, jak modyfikować i dopasować Elizę do własnych potrzeb. + +### Manualny start (Przeznaczone dla osób, które wiedzą, co robią) + +```bash +# Sklonuj repozytorium +git clone https://github.com/elizaos/eliza.git + +# Sprawdź, czy na pewno masz najnowszą wersję +# Projekt rozrasta się bardzo szybko, dlatego zalecane jest aby często sprawdzać wersję +git checkout $(git describe --tags --abbrev=0) +``` + +### Start przy użyciu Gitpod'a + +[![Otwórz w Gitpodzie](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### Edytuj plik .env + +Zmień nazwę pliku .env.example na .env i wypełnij wartości zmiennych, które będą potrzebne do uruchomienia aplikacji. + +``` +cp .env.example .env +``` + +Uwaga: .env jest opcjonalne. Jeżeli planujesz stawiać więcej niż jedną postać, zalecane jest korzystanie z plików JSON dedykowanych dla charakterów. Będzie to bardziej przejrzyste i łatwiejsze do znalezienia gdy trzeba będzie wprowadzić jakieś zmiany. + +### Automatyczny start Elizy + +Ta komenda postawi projekt i uruchomi bota z domyślnym charakterem. + +```bash +sh scripts/start.sh +``` + +### Edycja pliku postaci + +1. Otwórz `packages/core/src/defaultCharacter.ts` aby zmodyfikować postać. Odkomentuj i edytuj. + +2. Aby załadować niestandardowe osobowości: + - Uzyj komendy `pnpm start --characters="path/to/your/character.json"` + - Wiele plików z osobowościami może być załadowana jednocześnie +3. Połącz z platformą X (niegdyś Twitter) + - zamień `"clients": []` na `"clients": ["twitter"]` w pliku osobowości aby połączyć z X + +### Manualny Start Elizy + +```bash +pnpm i +pnpm build +pnpm start + +# Projekt rozwija się bardzo szybko, dlatego jeżeli robisz sobie przerwę na jakiś czas i wejdzie w międzyczasie dużo zmian, dobrze jest użyć tej komendy: +pnpm clean +``` + +#### Dodatkowe wymagania + +Możesz musieć zainstalować pakiet Sharp. Jeżeli przy odpalaniu projektu wyskakuje błąd, spróbuj go zainstalować tą komendą: + +``` +pnpm install --include=optional sharp +``` + +### Społeczność i kontakt + +- [GitHub Issues](https://github.com/elizaos/eliza/issues). Korzystaj w przypadku gdy napotkasz na jakieś bugi podczas uzywania Elizy, lub masz jakieś propozycje rozwoju. +- [Discord](https://discord.gg/ai16z). Używaj, gdy chcesz się pochwalić swoją aplikacją lub po prostu pogadać z kimś. + +## Osoby zaangażowane w rozwój: + + + + + +## Historia gwiazdek + +[![Wykres historii gwiazdek](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_PTBR.md b/README_PTBR.md new file mode 100644 index 0000000000..e81258ff3a --- /dev/null +++ b/README_PTBR.md @@ -0,0 +1,183 @@ +# Eliza + +Eliza Banner + +## Funcionalidades + +- 🛠 Conectores completos para Discord, Twitter e Telegram +- 👥 Suporte a múltiplos agentes e salas +- 📚 Ingestão e interação fácil com seus documentos +- 💾 Memória recuperável e armazenamento de documentos +- 🚀 Altamente extensível - crie suas próprias ações e clientes para estender as capacidades +- ☁️ Suporta muitos modelos, incluindo Llama local, OpenAI, Anthropic, Groq e mais +- 📦 Funciona perfeitamente! + +## Para que posso usá-lo? + +- 🤖 Chatbots +- 🕵️ Agentes autônomos +- 📈 Gestão de processos empresariais +- 🎮 NPCs em jogos de vídeo + +# Começando + +**Pré-requisitos (OBRIGATÓRIO):** + +- [Python 2.7+](https://www.python.org/downloads/) +- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [pnpm](https://pnpm.io/installation) + +### Edite o arquivo .env + +- Copie .env.example para .env e preencha os valores apropriados +- Edite as variáveis de ambiente do TWITTER para adicionar o nome de usuário e senha do seu bot + +### Edite o arquivo de personagem + +- Confira o arquivo `src/core/defaultCharacter.ts` - você pode modificá-lo +- Você também pode carregar personagens com o comando `pnpm start --characters="path/to/your/character.json"` e executar múltiplos bots ao mesmo tempo. + +Após configurar o arquivo .env e o arquivo de personagem, você pode iniciar o bot com o seguinte comando: + +``` +pnpm i +pnpm start +``` + +# Personalizando Eliza + +### Adicionando ações personalizadas + +Para evitar conflitos no diretório core, recomendamos adicionar ações personalizadas a um diretório `custom_actions` e depois adicioná-las ao arquivo `elizaConfig.yaml`. Veja o arquivo `elizaConfig.example.yaml` para um exemplo. + +## Executando com diferentes modelos + +### Executar com Llama + +Você pode executar modelos Llama 70B ou 405B configurando a variável de ambiente `XAI_MODEL` para `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` ou `meta-llama/Meta-Llama-3.1-405B-Instruct` + +### Executar com Grok + +Você pode executar modelos Grok configurando a variável de ambiente `XAI_MODEL` para `grok-beta` + +### Executar com OpenAI + +Você pode executar modelos OpenAI configurando a variável de ambiente `XAI_MODEL` para `gpt-4o-mini` ou `gpt-4o` + +## Requisitos Adicionais + +Pode ser necessário instalar o Sharp. Se você encontrar um erro ao iniciar, tente instalá-lo com o seguinte comando: + +``` +pnpm install --include=optional sharp +``` + +# Configuração do Ambiente + +Você precisará adicionar variáveis de ambiente ao seu arquivo .env para se conectar a várias plataformas: + +``` +# Variáveis de ambiente obrigatórias +DISCORD_APPLICATION_ID= +DISCORD_API_TOKEN= # Token do bot +OPENAI_API_KEY=sk-* # Chave API do OpenAI, começando com sk- +ELEVENLABS_XI_API_KEY= # Chave API do elevenlabs +GOOGLE_GENERATIVE_AI_API_KEY= # Chave API do Gemini + +# CONFIGURAÇÕES DO ELEVENLABS +ELEVENLABS_MODEL_ID=eleven_multilingual_v2 +ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM +ELEVENLABS_VOICE_STABILITY=0.5 +ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 +ELEVENLABS_VOICE_STYLE=0.66 +ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false +ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 +ELEVENLABS_OUTPUT_FORMAT=pcm_16000 + +TWITTER_DRY_RUN=false +TWITTER_USERNAME= # Nome de usuário da conta +TWITTER_PASSWORD= # Senha da conta +TWITTER_EMAIL= # Email da conta + +X_SERVER_URL= +XAI_API_KEY= +XAI_MODEL= + + +# Para perguntar coisas ao Claude +ANTHROPIC_API_KEY= + +# EVM +EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY + +# Solana +SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +# Fallback Wallet Configuration (deprecated) +WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +BIRDEYE_API_KEY= + +SOL_ADDRESS=So11111111111111111111111111111111111111112 +SLIPPAGE=1 +RPC_URL=https://api.mainnet-beta.solana.com +HELIUS_API_KEY= + + +## Telegram +TELEGRAM_BOT_TOKEN= + +TOGETHER_API_KEY= +``` + +# Configuração de Inferência Local + +### Configuração CUDA + +Se você tiver uma GPU NVIDIA, pode instalar o CUDA para acelerar dramaticamente a inferência local. + +``` +pnpm install +npx --no node-llama-cpp source download --gpu cuda +``` + +Certifique-se de ter instalado o CUDA Toolkit, incluindo cuDNN e cuBLAS. + +### Executando localmente + +Adicione XAI_MODEL e configure-o para uma das opções acima de [Executar com Llama](#executar-com-llama) - você pode deixar X_SERVER_URL e XAI_API_KEY em branco, ele baixa o modelo do huggingface e faz consultas localmente + +# Clientes + +## Bot do Discord + +Para ajuda com a configuração do seu Bot do Discord, confira aqui: https://discordjs.guide/preparations/setting-up-a-bot-application.html + +# Desenvolvimento + +## Testes + +Para executar a suíte de testes: + +```bash +pnpm test # Executar testes uma vez +pnpm test:watch # Executar testes no modo watch +``` + +Para testes específicos de banco de dados: + +```bash +pnpm test:sqlite # Executar testes com SQLite +pnpm test:sqljs # Executar testes com SQL.js +``` + +Os testes são escritos usando Jest e podem ser encontrados em arquivos `src/**/*.test.ts`. O ambiente de teste está configurado para: + +- Carregar variáveis de ambiente de `.env.test` +- Usar um tempo limite de 2 minutos para testes de longa duração +- Suportar módulos ESM +- Executar testes em sequência (--runInBand) + +Para criar novos testes, adicione um arquivo `.test.ts` adjacente ao código que você está testando. diff --git a/README_RS.md b/README_RS.md new file mode 100644 index 0000000000..91164e2d10 --- /dev/null +++ b/README_RS.md @@ -0,0 +1,181 @@ +# Eliza + +Baner Eliza + +## Funkcionalnosti + +- 🛠 Kompletni konektori za Discord, Twitter i Telegram +- 👥 Podrška za više agenata i soba +- 📚 Jednostavna ingestija i interakcija sa dokumentima +- 💾 Memorija koja se može povratiti i skladištenje dokumenata +- 🚀 Visoko proširivo - kreirajte sopstvene akcije i klijente za proširenje mogućnosti +- ☁️ Podržava više modela, uključujući Llama lokalno, OpenAI, Anthropic, Groq i više +- 📦 Radi besprekorno + +## Upotrebe + +- 🤖 Chatbotovi +- 🕵️ Autonomni agenti +- 📈 Upravljanje poslovnim procesima +- 🎮 NPC-ovi u video igrama + +# Prvi Koraci + +**Zahtevi (OBAVEZNI):** + +- [Python 2.7+](https://www.python.org/downloads/) +- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [pnpm](https://pnpm.io/installation) + +### Uredite .env datoteku + +- Kopirajte datoteku .env.example u .env i popunite odgovarajuće vrednosti +- Uredite TWITTER promenljive okruženja da dodate korisničko ime i lozinku bota + +### Uredite datoteku karaktera + +- Pregledajte datoteku `src/core/defaultCharacter.ts` - možete je modifikovati +- Takođe možete učitati karaktere sa komandom `pnpm start --characters="path/to/your/character.json"` i pokrenuti više botova istovremeno. + +Nakon što konfigurišete .env datoteku i datoteku karaktera, možete pokrenuti bota sa: + +``` +pnpm i +pnpm start +``` + +# Personalizacija Elize + +### Dodavanje prilagođenih akcija + +Da biste izbegli sukobe u centralnom direktorijumu, preporučuje se dodavanje prilagođenih akcija u direktorijum `custom_actions` i zatim ih dodajte u datoteku `elizaConfig.yaml`. Pogledajte datoteku `elizaConfig.example.yaml` za primer. + +## Pokretanje sa Različitim Modelima + +### Pokretanje sa Llama + +Možete pokrenuti Llama modele 70B ili 405B podešavanjem promenljive okruženja `XAI_MODEL` na `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` ili `meta-llama/Meta-Llama-3.1-405B-Instruct` + +### Pokretanje sa Grok + +Možete pokrenuti Grok modele podešavanjem promenljive okruženja `XAI_MODEL` na `grok-beta` + +### Pokretanje sa OpenAI + +Možete pokrenuti OpenAI modele podešavanjem promenljive okruženja `XAI_MODEL` na `gpt-4o-mini` ili `gpt-4o` + +## Dodatni Zahtevi + +Možda će biti potrebno instalirati Sharp. Ako naiđete na grešku prilikom pokretanja, pokušajte da ga instalirate sa: + +``` +pnpm install --include=optional sharp +``` + +# Konfiguracija Okruženja + +Trebaće vam da dodate promenljive okruženja u vašu .env datoteku da biste se povezali sa različitim platformama: + +``` +# Obavezne promenljive okruženja +DISCORD_APPLICATION_ID= +DISCORD_API_TOKEN= # Token bota +OPENAI_API_KEY=sk-* # API ključ OpenAI, počinje sa sk- +ELEVENLABS_XI_API_KEY= # API ključ ElevenLabs +GOOGLE_GENERATIVE_AI_API_KEY= # API ključ Gemini + +# KONFIGURACIJE ELEVENLABS +ELEVENLABS_MODEL_ID=eleven_multilingual_v2 +ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM +ELEVENLABS_VOICE_STABILITY=0.5 +ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 +ELEVENLABS_VOICE_STYLE=0.66 +ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false +ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 +ELEVENLABS_OUTPUT_FORMAT=pcm_16000 + +TWITTER_DRY_RUN=false +TWITTER_USERNAME= # Korisničko ime naloga +TWITTER_PASSWORD= # Lozinka naloga +TWITTER_EMAIL= # Email naloga + +X_SERVER_URL= +XAI_API_KEY= +XAI_MODEL= + +# Za konsultacije sa Claude +ANTHROPIC_API_KEY= + +# EVM +EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY + +# Solana +SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +# Konfiguracija rezervnog novčanika (zastarelo) +WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +BIRDEYE_API_KEY= + +SOL_ADDRESS=So11111111111111111111111111111111111111112 +SLIPPAGE=1 +RPC_URL=https://api.mainnet-beta.solana.com +HELIUS_API_KEY= + +## Telegram +TELEGRAM_BOT_TOKEN= + +TOGETHER_API_KEY= +``` + +# Konfiguracija Lokalne Inference + +### Konfiguracija CUDA + +Ako imate NVIDIA GPU, možete instalirati CUDA da značajno ubrzate lokalnu inferencu. + +``` +pnpm install +npx --no node-llama-cpp source download --gpu cuda +``` + +Uverite se da imate instaliran CUDA Toolkit, uključujući cuDNN i cuBLAS. + +### Lokalno Pokretanje + +Dodajte XAI_MODEL i konfigurišite ga sa jednom od opcija iz [Pokretanje sa Llama](#pokretanje-sa-llama) - možete ostaviti X_SERVER_URL i XAI_API_KEY praznim, preuzeće model sa HuggingFace i izvršiti upite lokalno + +# Klijenti + +## Discord Bot + +Za pomoć sa konfiguracijom vašeg Discord Bota, pogledajte: https://discordjs.guide/preparations/setting-up-a-bot-application.html + +# Razvoj + +## Testiranje + +Za pokretanje test suite-a: + +```bash +pnpm test # Pokreni testove jednom +pnpm test:watch # Pokreni testove u režimu posmatranja +``` + +Za specifične testove baze podataka: + +```bash +pnpm test:sqlite # Pokreni testove sa SQLite +pnpm test:sqljs # Pokreni testove sa SQL.js +``` + +Testovi su napisani sa Jest i mogu se naći u datotekama `src/**/*.test.ts`. Testno okruženje je konfigurisano za: + +- Učitavanje promenljivih okruženja iz `.env.test` +- Korišćenje limita od 2 minuta za dugotrajne testove +- Podršku za ESM module +- Pokretanje testova u sekvenci (--runInBand) + +Za kreiranje novih testova, dodajte `.test.ts` datoteku pored koda koji testirate. \ No newline at end of file diff --git a/README_RU.md b/README_RU.md new file mode 100644 index 0000000000..6a3ce2b0db --- /dev/null +++ b/README_RU.md @@ -0,0 +1,188 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [Документация](https://elizaos.github.io/eliza/) | 🎯 [Примеры](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ Особенности + +- 🛠 Полноценные коннекторы для Discord, Twitter и Telegram +- 👥 Поддержка нескольких агентов и комнат +- 📚 Простое добавление и взаимодействие с вашими документами +- 💾 Запоминание контекта и хранилище документов +- 🚀 Высокая маштабируемость - создавайте свои собственные действия и клиенты для расширения возможностей +- ☁️ Поддерживает множество моделей, включая локальные Llama, OpenAI, Anthropic, Groq и другие +- 📦 Простота в работе! + +## 🎯 Для чего это можно использовать? + +- 🤖 Чат-боты +- 🕵️ Автономные агенты +- 📈 Обработка бизнес-процессов +- 🎮 NPC в видеоиграх +- 🧠 Торговля + +## 🌍 Переводы + +
+Доступные языки + +- [中文说明](./README_CN.md) +- [日本語の説明](./README_JA.md) +- [한국어 설명](./README_KOR.md) +- [Instructions en français](./README_FR.md) +- [Instruções em português](./README_PTBR.md) +- [Инструкция на русском](./README_RU.md) + +

+ +# 🚀Начало работы + +**Необходимые условия (ОБЯЗАТЕЛЬНО):** + +- [Python 2.7+](https://www.python.org/downloads/) +- [Node.js 23.3+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [pnpm](https://pnpm.io/installation) + > **Для Windows пользователей:** требуется WSL + +### Редактирование файла .env + +- Скопируйте `.env.example` в `.env` и заполните соответствующими значениями + +```bash +cp .env.example .env +``` + +### Редактирование файла персонажа + +1. Откройте `src/core/defaultCharacter.ts`, чтобы изменить персонажа по умолчанию. + +2. Для загрузки пользовательских персонажей: + - Используйте команду `pnpm start --characters="path/to/your/character.json"` + - Можно загружать несколько файлов персонажей одновременно. + +### Запуск Eliza + +После настройки файла `.env` и файла персонажа вы можете запустить бота с помощью следующей команды: + +```bash +pnpm i +pnpm build +pnpm start + +# Проект быстро развивается, иногда нужно очищать проект, если вы возвращаетесь к нему спустя время +pnpm clean +``` + +#### Дополнительные требования + +Возможно, потребуется установить Sharp. Если при запуске возникнет ошибка, попробуйте установить его с помощью следующей команды: + +```bash +pnpm install --include=optional sharp +``` + +# Настройка окружения + +Вам потребуется добавить переменные окружения в файл `.env` для подключения к различным платформам: + +``` +# Обязательные переменные окружения +DISCORD_APPLICATION_ID= +DISCORD_API_TOKEN= # Токен бота +OPENAI_API_KEY=sk-* # API-ключ OpenAI, начинающийся с sk- +ELEVENLABS_XI_API_KEY= # API-ключ от elevenlabs +GOOGLE_GENERATIVE_AI_API_KEY= # API-ключ Gemini + +# НАСТРОЙКИ ELEVENLABS +ELEVENLABS_MODEL_ID=eleven_multilingual_v2 +ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM +ELEVENLABS_VOICE_STABILITY=0.5 +ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 +ELEVENLABS_VOICE_STYLE=0.66 +ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false +ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 +ELEVENLABS_OUTPUT_FORMAT=pcm_16000 + +TWITTER_DRY_RUN=false +TWITTER_USERNAME= # Имя пользователя аккаунта +TWITTER_PASSWORD= # Пароль аккаунта +TWITTER_EMAIL= # Email аккаунта + +X_SERVER_URL= +XAI_API_KEY= +XAI_MODEL= + + +# Для запросов к Claude +ANTHROPIC_API_KEY= + +# EVM +EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY + +# Solana +SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +# Fallback Wallet Configuration (deprecated) +WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +BIRDEYE_API_KEY= # API-ключ для BirdEye + +SOL_ADDRESS=So11111111111111111111111111111111111111112 +SLIPPAGE=1 +RPC_URL=https://api.mainnet-beta.solana.com +HELIUS_API_KEY= # API-ключ Helius + + +## Telegram +TELEGRAM_BOT_TOKEN= # Токен бота Telegram + +TOGETHER_API_KEY= + +``` + +# Локальная настройка среды + +### Настройка CUDA + +Если у вас есть NVIDIA GPU, вы можете установить CUDA для значительного ускорения локального инференса. + +```bash +pnpm install +npx --no node-llama-cpp source download --gpu cuda +``` + +Убедитесь, что вы установили CUDA Toolkit, включая cuDNN и cuBLAS. + +### Локальный запуск + +Добавьте `XAI_MODEL` и установите его в одно из вышеуказанных значений из [Запуск с Llama](#run-with-llama). Вы можете оставить `X_SERVER_URL` и `XAI_API_KEY` пустыми — модель будет загружена с huggingface и обработана локально. + +# Клиенты + +## Бот для Discord + +Для получения помощи по настройке бота Discord ознакомьтесь с инструкцией: [Настройка приложения бота](https://discordjs.guide/preparations/setting-up-a-bot-application.html). + +### Сообщество и контакты + +- [GitHub Issues](https://github.com/elizaos/eliza/issues). Лучше всего подходит для: сообщений об ошибках при использовании Eliza и предложений новых функций. +- [Discord](https://discord.gg/ai16z). Лучше всего подходит для: обмена своими приложениями и общения с сообществом. + +## Контрибьюторы + + + + + +## История звёзд + +[![График истории звёзд](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_TG.md b/README_TG.md new file mode 100644 index 0000000000..4263ff69ca --- /dev/null +++ b/README_TG.md @@ -0,0 +1,129 @@ + +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [Dokumentasyon](https://elizaos.github.io/eliza/) | 🎯 [Mga Halimbawa](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ Mga Tampok + +- 🛠️ Kumpletong suporta sa [Discord](https://discord.com/), [Twitter](https://twitter.com/), at [Telegram](https://telegram.org/) +- 🔗 Suporta para sa bawat modelo (Llama, Grok, OpenAI, Anthropic, atbp.) +- 👥 Suporta para sa multi-agent at kuwarto +- 📚 Madaling mag-load at makipag-ugnayan sa iyong mga dokumento +- 💾 Naaakses na memorya at imbakan ng dokumento +- 🚀 Napakabisa - maaaring gumawa ng sarili mong mga aksyon at kliyente +- ☁️ Sinusuportahan ang maraming modelo (lokal na Llama, OpenAI, Anthropic, Groq, atbp.) +- 📦 Madaling gamitin! + +## Mga Tutorial sa Bidyo + +[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL) + +## 🎯 Gamit ito para sa + +- 🤖 [Mga Chatbot](https://en.wikipedia.org/wiki/Chatbot) +- 🕵️ Mga Awtonomikong Ahente +- 📈 Pagproseso ng Negosyo +- 🎮 [Mga NPC sa mga Larong Kompyuter](https://en.wikipedia.org/wiki/Non-player_character) +- 🧠 Pangangalakal + +## 🚀 Pangkalahatang-ideya + +### Mga Kinakailangan + +- [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) + +> **Paalala para sa mga Gumagamit ng Windows:** Kailangan ang [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual). + +### Gamitin ang Starter (Inirerekomenda) + +```bash +git clone https://github.com/elizaos/eliza-starter.git +cd eliza-starter +cp .env.example .env +pnpm i && pnpm build && pnpm start +``` + +Basahin ang [Dokumentasyon](https://elizaos.github.io/eliza/) upang matutunan kung paano ipasadya ang Eliza. + +### Manwal na Pag-simula ng Eliza (Inirerekomenda lamang kung alam mo ang ginagawa mo) + +```bash +# Clone the repository +git clone https://github.com/elizaos/eliza.git + +# Checkout the latest release +git checkout $(git describe --tags --abbrev=0) +``` + +### Simulan ang Eliza gamit ang Gitpod + +[![Buksan sa Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### Ipasadya ang .env File + +Kopyahin ang `.env.example` sa `.env` at punan ang tamang mga halaga. + +```bash +cp .env.example .env +``` + +### Awtomatikong Simulan ang Eliza + +Ito ay magse-setup ng proyekto at sisimulan ang bot gamit ang kusang mapagpipilian na karakter. + +```bash +sh scripts/start.sh +``` + +### Ipasadya ang Karakter File + +1. Buksan ang `packages/core/src/defaultCharacter.ts` para baguhin ang kusang mapagpipilian na karakter. +2. Mag-load ng pasadya na mga karakter: + - Gamitin ang `pnpm start --characters="landas/sa/inyong/character.json"` + - Puwedeng mag-load ng maraming karakter file sabay-sabay. +3. Ikonekta ang Twitter (X): + - Baguhin ang `"clients": []` sa `"clients": ["twitter"]` sa karakter file upang ikonekta ang Twitter. + +### Manwal na Pag-simula ng Eliza + +```bash +pnpm i +pnpm build +pnpm start + +# Linisin ang proyekto kung bumalik ka dito matapos ang mahabang panahon +pnpm clean +``` + +#### Karagdagang Mga Kinakailangan + +Puwede mong kailangang mag-install ng [Sharp](https://sharp.pixelplumbing.com/). Kung may pagkakamali, subukang i-install ito gamit ang: + +```bash +pnpm install --include=optional sharp +``` + +### Komunidad at Kontak + +- [Mga Isyu sa GitHub](https://github.com/elizaos/eliza/issues): Para sa mga bug at mungkahi sa tampok. +- [Discord](https://discord.gg/ai16z): Para sa pagbabahagi ng aplikasyon at pakikihalubilo sa komunidad. + +## Mga Kontribyutor + + + + + +## Kasaysayan ng mga Bituin + +[![Tsart ng Kasaysayan ng mga Bituin](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_TH.md b/README_TH.md new file mode 100644 index 0000000000..fc853bd768 --- /dev/null +++ b/README_TH.md @@ -0,0 +1,129 @@ +# Eliza (อีไลซ่า) 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [คู่มือ](https://elizaos.github.io/eliza/) | 🎯 [ตัวอย่าง](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ ฟีเจอร์ + +- 🛠️ สามารถเชื่อมต่อ Discord, Twitter และ Telegram ได้ +- 🔗 ซัพพอร์ตครบทุกโมเดล (Llama, Grok, OpenAI, Anthropic, ฯลฯ) +- 👥 มัลติเอเจนต์และห้องสนทนา +- 📚 ง่ายต่อการดึงและเข้าถึงข้อมูลเอกสาร +- 💾 มีหน่วยความจำและที่จัดเก็บข้อมูล +- 🚀 ง่ายต่อการปรับแต่งไม่ว่าจะเป็นการสร้าง clients หรือกำหนด action +- ☁️ รองรับหลายโมเดล (local Llama, OpenAI, Anthropic, Groq, ฯลฯ) +- 📦 ครบเครื่องเรื่อง AI agent! + +## 🎯 ตัวอย่างการนำไปใช้ + +- 🤖 แชทบอท +- 🕵️ เอเจนต์อิสระ (Autonomous Agent) +- 📈 จัดการฝั่งธุรกิจ +- 🎮 ตัวละครในเกมที่ไม่ใช่ผู้เล่น (NPC) +- 🧠 การเทรด + +## 🚀 เริ่มต้นการใช้งาน + +### สิ่งที่จำเป็นก่อนเริ่มใช้งาน + +- [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) + +> **หมายเหตุสำหรับผู้ใช้ Windows:** จำเป็นต้องมี [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) + +### เริ่มใช้งานด้วยตัวอย่าง (แนะนำ) + +```bash +git clone https://github.com/elizaos/eliza-starter.git + +cp .env.example .env + +pnpm i && pnpm start +``` + +จากนั้นอ่าน [คู่มือ](https://elizaos.github.io/eliza/) เพื่อศึกษาวิธีการปรับแต่ง Eliza + +### เริ่มใช้งาน Eliza ด้วยตนเอง (แนะนำสำหรับคนที่มีประสบการณ์) + +```bash +# โคลน repo +git clone https://github.com/elizaos/eliza.git + +# Checkout release ล่าสุด +# โปรเจกต์นี้มีการอัปเดตอยู่บ่อยครั้ง เราแนะนำให้ checkout release ล่าสุดเสมอ +git checkout $(git describe --tags --abbrev=0) +``` + +### เริ่มใช้งาน Eliza ผ่าน Gitpod + +[![เปิดใน Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### แก้ไขไฟล์ .env + +คัดลอก .env.example ไปเป็น .env และระบุค่าที่เหมาะสม + +``` +cp .env.example .env +``` + +หมายเหตุ: ไม่จำเป็นต้องใช้ .env หากคุณอยากใช้งานเอเจนต์หลายๆตัวพร้อมกัน คุณสามารถส่ง secrets ผ่าน JSON ของตัวละครได้ + +### เริ่มใช้งาน Eliza แบบอัตโนมัติ + +จะทำการติดตั้งโปรเจกต์ทั้งหมด และเริ่มต้น bot ด้วยตัวละครแบบค่าเริ่มต้น + +```bash +sh scripts/start.sh +``` + +### แก้ไขไฟล์ตัวละคร + +1. เปิด `agent/src/character.ts` เพื่อแก้ไขตัวละครเริ่มต้น นำคอมเม้นออกและเริ่มแก้ไข + +2. การโหลดตัวละคร custom: + - ใช้ `pnpm start --characters="path/to/your/character.json"` + - สามารถโหลดหลายๆตัวละครพร้อมกันได้ +3. เชื่อมต่อกับ X (Twitter) + - เปลี่ยน `"clients": []` เป็น `"clients": ["twitter"]` ในไฟล์ตัวละครเพื่อเชื่อมต่อกับ X (Twitter) + +### เริ่มใช้งาน Eliza ด้วยตนเอง + +```bash +pnpm i +pnpm build +pnpm start + +# โปรเจกต์นี้มีการอัปเดตอยู่บ่อยครั้ง บางครั้งอาจต้องทำการ clean โปรเจกต์ถ้าหากกลับมาทำใหม่ +pnpm clean +``` + +#### สิ่งที่จำเป็นเพิ่มเติม + +คุณอาจต้องติดตั้ง Sharp ถ้าหากคุณเห็นข้อความ error เมื่อเริ่มต้น สามารถลองติดตั้งด้วยคำสั่งต่อไปนี้: + +``` +pnpm install --include=optional sharp +``` + +### ชุมชนและข้อมูลการติดต่อ + +- [GitHub Issues](https://github.com/elizaos/eliza/issues). เหมาะสำหรับ: เมื่อปัญหาที่พบเมื่อใช้ Eliza และข้อเสนอแนะเกี่ยวกับฟีเจอร์เพิ่มเติม +- [Discord](https://discord.gg/ai16z). เหมาะสำหรับ: แชร์ผลงานแอปพลิเคชั่นและพบปะกับคอมมูนิตี้ + +## ผู้มีส่วนร่วม + + + + + +## ประวัติดาว + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_TR.md b/README_TR.md new file mode 100644 index 0000000000..0fc3935997 --- /dev/null +++ b/README_TR.md @@ -0,0 +1,92 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [Dokümantasyon](https://elizaos.github.io/eliza/) | 🎯 [Örnekler](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ Özellikler + +- 🛠️ Tam donanımlı Discord, Twitter ve Telegram bağlantıları +- 🔗 Tüm modeller için destek (Llama, Grok, OpenAI, Anthropic, vb.) +- 👥 Çoklu-ajan ve oda desteği +- 📚 Belgelerinizi kolayca içe aktarın ve etkileşime geçin +- 💾 Geri çağrılabilir hafıza ve belge deposu +- 🚀 Yüksek düzeyde genişletilebilir - kendi eylemlerinizi ve istemcilerinizi oluşturun +- ☁️ Birçok modeli destekler (yerel Llama, OpenAI, Anthropic, Groq, vb.) +- 📦 Hemen çalışır! + +## 🎯 Kullanım Alanları + +- 🤖 Sohbet Botları +- 🕵️ Otonom Ajanlar +- 📈 İş Süreçleri Yönetimi +- 🎮 Video Oyun NPC'leri (Oyuncu Olmayan Karakter) +- 🧠 Alım Satım + +## 🚀 Hızlı Başlangıç + +### Gereksinimler + +- [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) + +> **Windows Kullanıcıları İçin Not:** WSL gereklidir + +### .env Dosyasını Düzenleyin + +.env.example dosyasını .env olarak kopyalayın ve uygun değerleri doldurun + +``` +cp .env.example .env +``` + +### Karakter Dosyasını Düzenleyin + +1. Varsayılan karakteri değiştirmek için `src/core/defaultCharacter.ts` dosyasını açın + +2. Özel karakterleri yüklemek için: + - `pnpm start --characters="path/to/your/character.json"` komutunu kullanın + - Birden fazla karakter dosyası aynı anda yüklenebilir + +### Eliza'yı Başlatın + +.env dosyasını ve karakter dosyasını ayarladıktan sonra, botu aşağıdaki komutla başlatabilirsiniz: + +```bash +pnpm i +pnpm build +pnpm start + +# Proje hızlı gelişiyor, projeye geri döndüğünüzde bazen projeyi temizlemeniz gerekebilir +pnpm clean +``` + +#### Ek Gereksinimler + +Sharp'ı yüklemeniz gerekebilir. Başlatma sırasında bir hata görürseniz, aşağıdaki komutla yüklemeyi deneyin: + +``` +pnpm install --include=optional sharp +``` + +### Topluluk ve İletişim + +- [GitHub Issues](https://github.com/elizaos/eliza/issues). Buna uygundur: Eliza kullanırken karşılaştığınız hatalar ve özellik önerileri. +- [Discord](https://discord.gg/ai16z). Buna uygundur: Uygulamalarınızı paylaşmak ve toplulukla vakit geçirmek. + +## Katkıda Bulunanlar + + + + + +## Yıldız Geçmişi + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date) diff --git a/README_VI.md b/README_VI.md new file mode 100644 index 0000000000..0622da99b7 --- /dev/null +++ b/README_VI.md @@ -0,0 +1,129 @@ +# Eliza 🤖 + +
+ Eliza Banner +
+ +
+ +📖 [Tài liệu](https://elizaos.github.io/eliza/) | 🎯 [Ví dụ](https://github.com/thejoven/awesome-eliza) + +
+ +## ✨ Tính năng + +- 🛠️ Phương thức kết nối đầy đủ tính năng với Discord, Twitter và Telegram +- 🔗 Hỗ trợ mọi mô hình ngôn ngữ lớn (Llama, Grok, OpenAI, Anthropic, v.v.) +- 👥 Hỗ trợ nhiều tác nhân và phòng trò chuyện +- 📚 Dễ dàng tiếp nhận và tương tác với tài liệu của bạn +- 💾 Bộ nhớ và kho lưu trữ tài liệu có thể truy xuất +- 🚀 Có khả năng mở rộng cao - tạo hành động và ứng dụng của riêng bạn +- ☁️ Hỗ trợ nhiều mô hình cùng lúc (Llama, OpenAI, Anthropic, Groq, v.v.) +- 📦 Đơn giản là nó hoạt động! + +## 🎯 Các trường hợp sử dụng + +- 🤖 Chatbots +- 🕵️ Các tác nhân tự động +- 📈 Xử lý các mô hình kinh tế +- 🎮 NPCs trong các trò chơi điện tử +- 🧠 Giao dịch (Trading) + +## 🚀 Bắt đầu + +### Điều kiện tiên quyết + +- [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) + +> **Chú ý cho người dùng Windows:** [WSL 2](https://learn.microsoft.com/de-de/windows/wsl/install-manual) là bắt buộc. + +### Sử dụng phiên bản Starters (Khuyến nghị) + +```bash +git clone https://github.com/elizaos/eliza-starter.git + +cp .env.example .env + +pnpm i && pnpm start +``` + +Sau đó hãy đọc [Tài liệu](https://elizaos.github.io/eliza/), để học cách để tùy chỉnh Eliza của bạn. + +### Khởi động Eliza theo cách thủ công (Chỉ khuyến khích nếu bạn biết mình đang làm gì) + +```bash +# Sao chép repository +git clone https://github.com/elizaos/eliza.git + +# Kiểm tra bản phát hành mới nhất +# Dự án này cải tiến rất nhanh, vì vậy chúng tôi khuyên bạn nên kiểm tra bản phát hành mới nhất +git checkout $(git describe --tags --abbrev=0) +``` + +### Bắt đầu Eliza với Gitpod + +[![Mở Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main) + +### Chỉnh sửa tệp .env + +Sao chép .env.example vào .env và điền các giá trị thích hợp. + +``` +cp .env.example .env +``` + +Lưu ý: .env là tùy chọn. Nếu bạn đang có kế hoạch chạy nhiều tác nhân riêng biệt, bạn có thể truyền secret qua định dạng JSON. + +### Tự động khởi động Eliza + +Điều này sẽ chạy mọi thứ để thiết lập dự án và khởi động bot với tính cách (character) mặc định. + +```bash +sh scripts/start.sh +``` + +### Chỉnh sửa tập tin tính cách + +1. Mở `agent/src/character.ts`, để chỉnh sửa tính cách mặc định. Bỏ chú thích và chỉnh sửa. + +2. Để chạy các tính cách tùy chỉnh: + - Sử dụng `pnpm start --characters="path/to/your/character.json"` + - Nhiều tính cách có thể được chạy cùng lúc với nhau +3. Kết nối với X (Twitter) + - Thay đổi `"clients": []` thành `"clients": ["twitter"]` ở trong tập tính cách (character) để kết nối với X. + +### Bắt đầu Eliza theo cách thủ công + +```bash +pnpm i +pnpm build +pnpm start + +# Dự án cải tiến rất nhanh, đôi khi bạn cần phải dọn dẹp dự án nếu bạn quay lại dự án +pnpm clean +``` + +#### Yêu cầu bổ sung + +Bạn có thể cần cài đặt Sharp. Nếu bạn thấy lỗi khi khởi động, hãy thử cài đặt bằng lệnh sau: + +``` +pnpm install --include=optional sharp +``` + +### Cộng đồng & Liên hệ + +- [GitHub Issues](https://github.com/elizaos/eliza/issues). Phù hợp nhất cho: các lỗi bạn gặp phải khi sử dụng Eliza và các đề xuất tính năng. +- [Discord](https://discord.gg/ai16z). Phù hợp nhất cho: chia sẻ ứng dụng của bạn và giao lưu với cộng đồng. + +## Người đóng góp + + + + + +## Lịch sử Star cho repo + +[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date)