|
1 |
| -# Eliza |
| 1 | +# Eliza 🤖 |
2 | 2 |
|
3 |
| -<img src="./docs/static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" /> |
| 3 | +<div align="center"> |
| 4 | + <img src="./docs/static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" /> |
| 5 | +</div> |
4 | 6 |
|
5 |
| -### [For Chinese Version: 中文说明](./README_CN.md) |
| 7 | +<div align="center"> |
| 8 | + |
| 9 | + 📖 [Documentation](https://ai16z.github.io/eliza/) | 🎯 [Examples](https://github.com/thejoven/awesome-eliza) |
| 10 | + |
| 11 | +</div> |
6 | 12 |
|
7 |
| -### [For Japanese Version: 日本語の説明](./README_JA.md) |
| 13 | +## ✨ Features |
8 | 14 |
|
9 |
| -### [For Korean Version: 한국어 설명](./README_KOR.md) |
10 |
| - |
11 |
| -### [For French Version: Instructions en français](./README_FR.md) |
12 |
| - |
13 |
| -### [For Portuguese Version: Instruções em português](./README_PTBR.md) |
14 |
| - |
15 |
| -## Features |
16 |
| - |
17 |
| -- 🛠 Full-featured Discord, Twitter and Telegram connectors |
| 15 | +- 🛠️ Full-featured Discord, Twitter and Telegram connectors |
| 16 | +- 🔗 Support for every model (Llama, Grok, OpenAI, Anthropic, etc.) |
18 | 17 | - 👥 Multi-agent and room support
|
19 | 18 | - 📚 Easily ingest and interact with your documents
|
20 | 19 | - 💾 Retrievable memory and document store
|
21 |
| -- 🚀 Highly extensible - create your own actions and clients to extend capabilities |
22 |
| -- ☁️ Supports many models, including local Llama, OpenAI, Anthropic, Groq, and more |
| 20 | +- 🚀 Highly extensible - create your own actions and clients |
| 21 | +- ☁️ Supports many models (local Llama, OpenAI, Anthropic, Groq, etc.) |
23 | 22 | - 📦 Just works!
|
24 | 23 |
|
25 |
| -## What can I use it for? |
| 24 | +## 🎯 Use Cases |
26 | 25 |
|
27 | 26 | - 🤖 Chatbots
|
28 | 27 | - 🕵️ Autonomous Agents
|
29 |
| -- 📈 Business process handling |
30 |
| -- 🎮 Video game NPCs |
31 |
| - |
32 |
| -# Getting Started |
33 |
| - |
34 |
| -**Prerequisites (MUST):** |
35 |
| - |
36 |
| -- [Python 2.7+](https://www.python.org/downloads/) |
37 |
| -- [Node.js 23.1+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) |
38 |
| -- [pnpm](https://pnpm.io/installation) |
39 |
| - |
40 |
| -### Edit the .env file |
41 |
| - |
42 |
| -- Copy .env.example to .env and fill in the appropriate values |
43 |
| -- Edit the TWITTER environment variables to add your bot's username and password |
44 |
| - |
45 |
| -### Edit the character file |
46 |
| - |
47 |
| -- Check out the file `src/core/defaultCharacter.ts` - you can modify this |
48 |
| -- You can also load characters with the `pnpm start --characters="path/to/your/character.json"` and run multiple bots at the same time. |
49 |
| - |
50 |
| -After setting up the .env file and character file, you can start the bot with the following command: |
51 |
| - |
52 |
| -``` |
53 |
| -pnpm i |
54 |
| -pnpm start |
55 |
| -``` |
56 |
| - |
57 |
| -# Customising Eliza |
58 |
| - |
59 |
| -### Adding custom actions |
60 |
| - |
61 |
| -To avoid git clashes in the core directory, we recommend adding custom actions to a `custom_actions` directory and then adding them to the `elizaConfig.yaml` file. See the `elizaConfig.example.yaml` file for an example. |
62 |
| - |
63 |
| -## Running with different models |
64 |
| - |
65 |
| -### Run with Llama |
| 28 | +- 📈 Business Process Handling |
| 29 | +- 🎮 Video Game NPCs |
| 30 | +- 🧠 Trading |
66 | 31 |
|
67 |
| -You can run Llama 70B or 405B models by setting the `XAI_MODEL` environment variable to `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` or `meta-llama/Meta-Llama-3.1-405B-Instruct` |
| 32 | +## 🌍 Translations |
68 | 33 |
|
69 |
| -### Run with Grok |
| 34 | +<details> |
| 35 | +<summary>Available Languages</summary> |
70 | 36 |
|
71 |
| -You can run Grok models by setting the `XAI_MODEL` environment variable to `grok-beta` |
| 37 | +- [中文说明](./README_CN.md) |
| 38 | +- [日本語の説明](./README_JA.md) |
| 39 | +- [한국어 설명](./README_KOR.md) |
| 40 | +- [Instructions en français](./README_FR.md) |
| 41 | +- [Instruções em português](./README_PTBR.md) |
72 | 42 |
|
73 |
| -### Run with OpenAI |
| 43 | +</details> |
74 | 44 |
|
75 |
| -You can run OpenAI models by setting the `XAI_MODEL` environment variable to `gpt-4o-mini` or `gpt-4o` |
| 45 | +## 🚀 Quick Start |
76 | 46 |
|
77 |
| -## Additional Requirements |
| 47 | +### Prerequisites |
78 | 48 |
|
79 |
| -You may need to install Sharp. If you see an error when starting up, try installing it with the following command: |
80 |
| - |
81 |
| -``` |
82 |
| -pnpm install --include=optional sharp |
83 |
| -``` |
84 |
| - |
85 |
| -# Environment Setup |
86 |
| - |
87 |
| -You will need to add environment variables to your .env file to connect to various platforms: |
88 |
| - |
89 |
| -``` |
90 |
| -# Required environment variables |
91 |
| -DISCORD_APPLICATION_ID= |
92 |
| -DISCORD_API_TOKEN= # Bot token |
93 |
| -OPENAI_API_KEY=sk-* # OpenAI API key, starting with sk- |
94 |
| -ELEVENLABS_XI_API_KEY= # API key from elevenlabs |
95 |
| -GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key |
96 |
| -
|
97 |
| -# ELEVENLABS SETTINGS |
98 |
| -ELEVENLABS_MODEL_ID=eleven_multilingual_v2 |
99 |
| -ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM |
100 |
| -ELEVENLABS_VOICE_STABILITY=0.5 |
101 |
| -ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 |
102 |
| -ELEVENLABS_VOICE_STYLE=0.66 |
103 |
| -ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false |
104 |
| -ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 |
105 |
| -ELEVENLABS_OUTPUT_FORMAT=pcm_16000 |
106 |
| -
|
107 |
| -TWITTER_DRY_RUN=false |
108 |
| -TWITTER_USERNAME= # Account username |
109 |
| -TWITTER_PASSWORD= # Account password |
110 |
| -TWITTER_EMAIL= # Account email |
111 |
| -TWITTER_COOKIES= # Account cookies |
112 |
| -
|
113 |
| -X_SERVER_URL= |
114 |
| -XAI_API_KEY= |
115 |
| -XAI_MODEL= |
116 |
| -
|
117 |
| -
|
118 |
| -# For asking Claude stuff |
119 |
| -ANTHROPIC_API_KEY= |
120 |
| -
|
121 |
| -WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY |
122 |
| -WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY |
123 |
| -
|
124 |
| -BIRDEYE_API_KEY= |
125 |
| -
|
126 |
| -SOL_ADDRESS=So11111111111111111111111111111111111111112 |
127 |
| -SLIPPAGE=1 |
128 |
| -RPC_URL=https://api.mainnet-beta.solana.com |
129 |
| -HELIUS_API_KEY= |
130 |
| -
|
131 |
| -
|
132 |
| -## Telegram |
133 |
| -TELEGRAM_BOT_TOKEN= |
134 |
| -
|
135 |
| -TOGETHER_API_KEY= |
136 |
| -``` |
| 49 | +- [Python 2.7+](https://www.python.org/downloads/) |
| 50 | +- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) |
| 51 | +- [pnpm](https://pnpm.io/installation) |
137 | 52 |
|
138 |
| -# Local Inference Setup |
| 53 | +> **Note for Windows Users:** WSL is required |
139 | 54 |
|
140 |
| -### CUDA Setup |
| 55 | +### Edit the .env file |
141 | 56 |
|
142 |
| -If you have an NVIDIA GPU, you can install CUDA to speed up local inference dramatically. |
| 57 | +Copy .env.example to .env and fill in the appropriate values |
143 | 58 |
|
144 | 59 | ```
|
145 |
| -pnpm install |
146 |
| -npx --no node-llama-cpp source download --gpu cuda |
| 60 | +cp .env.example .env |
147 | 61 | ```
|
148 | 62 |
|
149 |
| -Make sure that you've installed the CUDA Toolkit, including cuDNN and cuBLAS. |
150 |
| - |
151 |
| -### Running locally |
152 |
| - |
153 |
| -Add XAI_MODEL and set it to one of the above options from [Run with |
154 |
| -Llama](#run-with-llama) - you can leave X_SERVER_URL and XAI_API_KEY blank, it |
155 |
| -downloads the model from huggingface and queries it locally |
156 |
| - |
157 |
| -# Clients |
158 |
| - |
159 |
| -## Discord Bot |
| 63 | +### Edit the character file |
160 | 64 |
|
161 |
| -For help with setting up your Discord Bot, check out here: https://discordjs.guide/preparations/setting-up-a-bot-application.html |
| 65 | +1. Open `src/core/defaultCharacter.ts` to modify the default character |
162 | 66 |
|
163 |
| -# Development |
| 67 | +2. To load custom characters: |
| 68 | + - Use `pnpm start --characters="path/to/your/character.json"` |
| 69 | + - Multiple character files can be loaded simultaneously |
164 | 70 |
|
165 |
| -## Testing |
| 71 | +### Start Eliza |
166 | 72 |
|
167 |
| -To run the test suite, you must got into each package: |
| 73 | +After setting up the .env file and character file, you can start the bot with the following command: |
168 | 74 |
|
169 | 75 | ```bash
|
170 |
| -pnpm test # Run tests once |
171 |
| -pnpm test:watch # Run tests in watch mode |
172 |
| -``` |
173 |
| - |
174 |
| -For database-specific tests: |
| 76 | +pnpm i |
| 77 | +pnpm build |
| 78 | +pnpm start |
175 | 79 |
|
176 |
| -```bash |
177 |
| -pnpm test:sqlite # Run tests with SQLite |
178 |
| -pnpm test:sqljs # Run tests with SQL.js |
| 80 | +# The project iterates fast, sometimes you need to clean the project if you are coming back to the project |
| 81 | +pnpm clean |
179 | 82 | ```
|
180 | 83 |
|
181 |
| -Tests are written using Jest and can be found in `src/**/*.test.ts` files. The test environment is configured to: |
182 |
| - |
183 |
| -- Load environment variables from `.env.test` |
184 |
| -- Use a 2-minute timeout for long-running tests |
185 |
| -- Support ESM modules |
186 |
| -- Run tests in sequence (--runInBand) |
| 84 | +#### Additional Requirements |
187 | 85 |
|
188 |
| -To create new tests, add a `.test.ts` file adjacent to the code you're testing. |
189 |
| - |
190 |
| -## Docker |
191 |
| - |
192 |
| -For development purposes, you can run the docker container with the following command: |
| 86 | +You may need to install Sharp. If you see an error when starting up, try installing it with the following command: |
193 | 87 |
|
194 | 88 | ```
|
195 |
| -pnpm docker |
| 89 | +pnpm install --include=optional sharp |
196 | 90 | ```
|
197 | 91 |
|
198 |
| -This will drop you into a shell inside the docker container where you can continue to configure the instance |
199 |
| - |
200 |
| -and then you can start it with `pnpm start` |
201 |
| - |
202 |
| - |
203 |
| -## Community & contact |
204 |
| - |
205 |
| -* [GitHub Issues](https://github.com/ai16z/eliza/issues). Best for: bugs you encounter using Eliza, and feature proposals. |
206 |
| -* [Discord](https://discord.gg/ai16z). Best for: sharing your applications and hanging out with the community. |
| 92 | +### Community & contact |
207 | 93 |
|
| 94 | +- [GitHub Issues](https://github.com/ai16z/eliza/issues). Best for: bugs you encounter using Eliza, and feature proposals. |
| 95 | +- [Discord](https://discord.gg/ai16z). Best for: sharing your applications and hanging out with the community. |
208 | 96 |
|
209 |
| -**Contributors** |
| 97 | +## Contributors |
210 | 98 |
|
211 | 99 | <a href="https://github.com/ai16z/eliza/graphs/contributors">
|
212 | 100 | <img src="https://contrib.rocks/image?repo=ai16z/eliza" />
|
|
0 commit comments