Skip to content

Commit 958b2c6

Browse files
authored
Merge branch 'develop' into fix-plugin-import-error
2 parents 2a93d1d + e49f680 commit 958b2c6

File tree

92 files changed

+9962
-914
lines changed

Some content is hidden

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

92 files changed

+9962
-914
lines changed

.env.example

+56
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ STARKNET_ADDRESS=
306306
STARKNET_PRIVATE_KEY=
307307
STARKNET_RPC_URL=
308308

309+
# Lens Network Configuration
310+
LENS_ADDRESS=
311+
LENS_PRIVATE_KEY=
312+
309313
# Coinbase
310314
COINBASE_COMMERCE_KEY= # From Coinbase developer portal
311315
COINBASE_API_KEY= # From Coinbase developer portal
@@ -359,6 +363,12 @@ FLOW_ENDPOINT_URL= # Default: https://mainnet.onflow.org
359363
INTERNET_COMPUTER_PRIVATE_KEY=
360364
INTERNET_COMPUTER_ADDRESS=
361365

366+
367+
#Cloudflare AI Gateway
368+
CLOUDFLARE_GW_ENABLED= # Set to true to enable Cloudflare AI Gateway
369+
CLOUDFLARE_AI_ACCOUNT_ID= # Cloudflare AI Account ID - found in the Cloudflare Dashboard under AI Gateway
370+
CLOUDFLARE_AI_GATEWAY_ID= # Cloudflare AI Gateway ID - found in the Cloudflare Dashboard under AI Gateway
371+
362372
# Aptos
363373
APTOS_PRIVATE_KEY= # Aptos private key
364374
APTOS_NETWORK= # Must be one of mainnet, testnet
@@ -477,6 +487,52 @@ TAVILY_API_KEY=
477487
VERIFIABLE_INFERENCE_ENABLED=false # Set to false to disable verifiable inference
478488
VERIFIABLE_INFERENCE_PROVIDER=opacity # Options: opacity
479489

490+
480491
# Autonome Configuration
481492
AUTONOME_JWT_TOKEN=
482493
AUTONOME_RPC=https://wizard-bff-rpc.alt.technology/v1/bff/aaa/apps
494+
495+
####################################
496+
#### Akash Network Configuration ####
497+
####################################
498+
AKASH_ENV=mainnet
499+
AKASH_NET=https://raw.githubusercontent.com/ovrclk/net/master/mainnet
500+
RPC_ENDPOINT=https://rpc.akashnet.net:443
501+
AKASH_GAS_PRICES=0.025uakt
502+
AKASH_GAS_ADJUSTMENT=1.5
503+
AKASH_KEYRING_BACKEND=os
504+
AKASH_FROM=default
505+
AKASH_FEES=20000uakt
506+
AKASH_DEPOSIT=500000uakt
507+
AKASH_MNEMONIC=
508+
AKASH_WALLET_ADDRESS=
509+
# Akash Pricing API
510+
AKASH_PRICING_API_URL=https://console-api.akash.network/v1/pricing
511+
# Default values # 1 CPU = 1000 1GB = 1000000000 1GB = 1000000000
512+
AKASH_DEFAULT_CPU=1000
513+
AKASH_DEFAULT_MEMORY=1000000000
514+
AKASH_DEFAULT_STORAGE=1000000000
515+
AKASH_SDL=example.sdl.yml
516+
# Close deployment
517+
# Close all deployments = closeAll
518+
# Close a single deployment = dseq and add the value in AKASH_CLOSE_DSEQ
519+
AKASH_CLOSE_DEP=closeAll
520+
AKASH_CLOSE_DSEQ=19729929
521+
# Provider Info we added one to check you will have to pass this into the action
522+
AKASH_PROVIDER_INFO=akash1ccktptfkvdc67msasmesuy5m7gpc76z75kukpz
523+
# Deployment Status
524+
# AKASH_DEP_STATUS = dseq or param_passed when you are building you wil pass the dseq dinamically to test you
525+
# you can pass the dseq using AKASH_DEP_DSEQ 19729929 is an example of a dseq we test while build.
526+
AKASH_DEP_STATUS=dseq
527+
AKASH_DEP_DSEQ=19729929
528+
# Gas Estimation Options: close, create, or update
529+
# qseq is required when operation is "close" 19729929 is an example of a dseq we test while build.
530+
AKASH_GAS_OPERATION=close
531+
AKASH_GAS_DSEQ=19729929
532+
# Manifest
533+
# Values: "auto" | "manual" | "validate_only" Default: "auto"
534+
AKASH_MANIFEST_MODE=auto
535+
# Default: Will use the SDL directory
536+
AKASH_MANIFEST_PATH=
537+
# Values: "strict" | "lenient" | "none" - Default: "strict"
538+
AKASH_MANIFEST_VALIDATION_LEVEL=strict

.github/workflows/integrationTests.yaml

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

@@ -33,12 +33,9 @@ jobs:
3333
- name: Build packages
3434
run: pnpm build
3535

36-
- name: Check for API key
37-
run: |
38-
if [ -z "$OPENAI_API_KEY" ]; then
39-
echo "Error: OPENAI_API_KEY is not set."
40-
exit 1
41-
fi
42-
4336
- name: Run integration tests
44-
run: pnpm run integrationTests
37+
env:
38+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
39+
COINBASE_COMMERCE_KEY: ${{ secrets.COINBASE_COMMERCE_KEY }}
40+
run: |
41+
pnpm run integrationTests

agent/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"@elizaos/plugin-gitbook": "workspace:*",
5151
"@elizaos/plugin-story": "workspace:*",
5252
"@elizaos/plugin-goat": "workspace:*",
53+
"@elizaos/plugin-lensNetwork": "workspace:*",
5354
"@elizaos/plugin-icp": "workspace:*",
5455
"@elizaos/plugin-image-generation": "workspace:*",
5556
"@elizaos/plugin-movement": "workspace:*",
@@ -86,6 +87,7 @@
8687
"@elizaos/plugin-arthera": "workspace:*",
8788
"@elizaos/plugin-allora": "workspace:*",
8889
"@elizaos/plugin-opacity": "workspace:*",
90+
"@elizaos/plugin-akash": "workspace:*",
8991
"readline": "1.3.0",
9092
"ws": "8.18.0",
9193
"yargs": "17.7.2"

agent/src/index.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import { flowPlugin } from "@elizaos/plugin-flow";
6363
import { fuelPlugin } from "@elizaos/plugin-fuel";
6464
import { genLayerPlugin } from "@elizaos/plugin-genlayer";
6565
import { imageGenerationPlugin } from "@elizaos/plugin-image-generation";
66+
import { lensPlugin } from "@elizaos/plugin-lensNetwork";
6667
import { multiversxPlugin } from "@elizaos/plugin-multiversx";
6768
import { nearPlugin } from "@elizaos/plugin-near";
6869
import { nftGenerationPlugin } from "@elizaos/plugin-nft-generation";
@@ -80,7 +81,6 @@ import { teeMarlinPlugin } from "@elizaos/plugin-tee-marlin";
8081
import { tonPlugin } from "@elizaos/plugin-ton";
8182
import { webSearchPlugin } from "@elizaos/plugin-web-search";
8283

83-
import { coingeckoPlugin } from "@elizaos/plugin-coingecko";
8484
import { giphyPlugin } from "@elizaos/plugin-giphy";
8585
import { letzAIPlugin } from "@elizaos/plugin-letzai";
8686
import { thirdwebPlugin } from "@elizaos/plugin-thirdweb";
@@ -90,6 +90,7 @@ import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era";
9090
import { OpacityAdapter } from "@elizaos/plugin-opacity";
9191
import { openWeatherPlugin } from "@elizaos/plugin-open-weather";
9292
import { stargazePlugin } from "@elizaos/plugin-stargaze";
93+
import { akashPlugin } from "@elizaos/plugin-akash";
9394
import Database from "better-sqlite3";
9495
import fs from "fs";
9596
import net from "net";
@@ -760,8 +761,8 @@ export async function createAgent(
760761
goatPlugin,
761762
getSecret(character, "COINGECKO_API_KEY") ||
762763
getSecret(character, "COINGECKO_PRO_API_KEY")
763-
? coingeckoPlugin
764-
: null,
764+
? coingeckoPlugin
765+
: null,
765766
getSecret(character, "EVM_PROVIDER_URL") ? goatPlugin : null,
766767
getSecret(character, "ABSTRACT_PRIVATE_KEY")
767768
? abstractPlugin
@@ -774,6 +775,10 @@ export async function createAgent(
774775
getSecret(character, "FLOW_PRIVATE_KEY")
775776
? flowPlugin
776777
: null,
778+
getSecret(character, "LENS_ADDRESS") &&
779+
getSecret(character, "LENS_PRIVATE_KEY")
780+
? lensPlugin
781+
: null,
777782
getSecret(character, "APTOS_PRIVATE_KEY") ? aptosPlugin : null,
778783
getSecret(character, "MVX_PRIVATE_KEY") ? multiversxPlugin : null,
779784
getSecret(character, "ZKSYNC_PRIVATE_KEY") ? zksyncEraPlugin : null,
@@ -811,6 +816,10 @@ export async function createAgent(
811816
? artheraPlugin
812817
: null,
813818
getSecret(character, "ALLORA_API_KEY") ? alloraPlugin : null,
819+
getSecret(character, "AKASH_MNEMONIC") &&
820+
getSecret(character, "AKASH_WALLET_ADDRESS")
821+
? akashPlugin
822+
: null,
814823
].filter(Boolean),
815824
providers: [],
816825
actions: [],

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ To create new tests, add a `.test.ts` file adjacent to the code you're testing.
176176

177177
## Docs Updates
178178

179-
Please make sure to vetify if the documentation provided is correct. In order to do so, please run the docs service.
179+
Please make sure to verify if the documentation provided is correct. In order to do so, please run the docs service.
180180

181181
```console
182182
docker compose -f docker-compose-docs.yaml up --build

docs/README_PT.md

+191
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# Eliza - framework de simulação Multi-agentes
2+
3+
# https://github.com/elizaOS/eliza
4+
5+
# Visite https://eliza.builders para suporte
6+
7+
## 🌍 README Traduções
8+
9+
[中文说明](README_CN.md) | [Deutsch](README_DE.md) | [Français](README_FR.md) | [ไทย](README_TH.md) | [Español](README_ES.md) | [Português](README_PT.md)
10+
11+
# dev branch
12+
13+
<img src="static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" />
14+
15+
_Como visto dando funcionamento em [@DegenSpartanAI](https://x.com/degenspartanai) e [@MarcAIndreessen](https://x.com/pmairca)_
16+
17+
- Framework Multi-agente de simulação
18+
- Adicione quantos personagens únicos quiser com o [characterfile](https://github.com/lalalune/characterfile/)
19+
- Conectores completos para Discord e Twitter, com suporte para canais de voz no Discord
20+
- Memória RAG completa para conversas e documentos
21+
- Pode ler links e PDFs, transcrever áudios e vídeos, resumir conversas e muito mais
22+
- Altamente extensível - crie suas próprias ações e clientes para ampliar as capacidades do Eliza
23+
- Suporte para modelos de código aberto e locais (configuração padrão com Nous Hermes Llama 3.1B)
24+
- Suporte ao OpenAI para inferência em nuvem em dispositivos com configurações leves
25+
- Modo "Perguntar ao Claude" para chamadas a Claude em consultas mais complexas
26+
- 100% Typescript
27+
28+
# Iniciando
29+
30+
**Pré-requisitos (OBRIGATÓRIO):**
31+
32+
- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
33+
- [pnpm](https://pnpm.io/installation)
34+
35+
### Edite o arquivo .env
36+
37+
- Copie .env.example para .env e preencha com valores apropriados
38+
- Edite as variáveis de ambiente do TWITTER para adicionar o nome de usuário e a senha do seu bot
39+
40+
### Edite o arquivo de personagem (character file)
41+
42+
- Verifique o arquivo `src/core/defaultCharacter.ts` - você pode modificá-lo
43+
- Você também pode carregar personagens com o comando `pnpm start --characters="path/to/your/character.json"` e executar vários bots ao mesmo tempo.
44+
45+
Após configurar o arquivo .env e o arquivo de personagem (character file), você pode iniciar o bot com o seguinte comando:
46+
47+
```
48+
pnpm i
49+
pnpm start
50+
```
51+
52+
# Personalizando Eliza
53+
54+
### Adicionando ações personalizadas
55+
56+
Para evitar conflitos no diretório principal, recomendamos adicionar ações personalizadas a um diretório chamado `custom_actions` e, em seguida, incluí-las no arquivo `elizaConfig.yaml`. Consulte o arquivo `elizaConfig.example.yaml` para um exemplo.
57+
58+
## Rodando com diferentes modelos
59+
60+
### Rode com Llama
61+
62+
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`
63+
64+
### Rode com Grok
65+
66+
Você pode executar modelos Grok configurando a variável de ambiente `XAI_MODEL` para `grok-beta`.
67+
68+
### Rode com OpenAI
69+
70+
Você pode executar modelos OpenAI configurando a variável de ambiente para `gpt-4-mini` or `gpt-4o`
71+
72+
## Requisitos Adicionais
73+
74+
Você pode precisar instalar o Sharp. Se aparecer um erro ao iniciar, tente instalá-lo com o seguinte comando:
75+
76+
```
77+
pnpm install --include=optional sharp
78+
```
79+
80+
# Configuração do Ambiente
81+
82+
Você precisará adicionar variáveis de ambiente ao seu arquivo .env para conectar a diversas plataformas:
83+
84+
```
85+
# Variaveis de ambiente obrigatorias
86+
DISCORD_APPLICATION_ID=
87+
DISCORD_API_TOKEN= # Bot token
88+
OPENAI_API_KEY=sk-* # OpenAI API key, começando com sk-
89+
ELEVENLABS_XI_API_KEY= # API key da elevenlabs
90+
91+
# Configuracoes ELEVENLABS
92+
ELEVENLABS_MODEL_ID=eleven_multilingual_v2
93+
ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM
94+
ELEVENLABS_VOICE_STABILITY=0.5
95+
ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9
96+
ELEVENLABS_VOICE_STYLE=0.66
97+
ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false
98+
ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4
99+
ELEVENLABS_OUTPUT_FORMAT=pcm_16000
100+
101+
TWITTER_DRY_RUN=false
102+
TWITTER_USERNAME= # Usuário da conta
103+
TWITTER_PASSWORD= # Senha da conta
104+
TWITTER_EMAIL= # Email da conta
105+
106+
X_SERVER_URL=
107+
XAI_API_KEY=
108+
XAI_MODEL=
109+
110+
111+
# Para perguntas ao Claude
112+
ANTHROPIC_API_KEY=
113+
114+
WALLET_SECRET_KEY=EXAMPLE_WALLET_SECRET_KEY
115+
WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY
116+
117+
BIRDEYE_API_KEY=
118+
119+
SOL_ADDRESS=So11111111111111111111111111111111111111112
120+
SLIPPAGE=1
121+
RPC_URL=https://api.mainnet-beta.solana.com
122+
HELIUS_API_KEY=
123+
124+
125+
## Telegram
126+
TELEGRAM_BOT_TOKEN=
127+
128+
TOGETHER_API_KEY=
129+
```
130+
131+
# Configuração de Inferência Local
132+
133+
### Configuração CUDA
134+
135+
Se você tiver uma GPU NVIDIA, pode instalar o CUDA para acelerar significativamente a inferência local.
136+
137+
```
138+
pnpm install
139+
npx --no node-llama-cpp source download --gpu cuda
140+
```
141+
142+
Certifique-se de que você instalou o CUDA Toolkit, incluindo o cuDNN e cuBLAS.
143+
144+
### Rodando localmente
145+
146+
Add XAI_MODEL e defina-o para uma das opções mencionadas em [Run with
147+
Llama](#run-with-llama) - você pode deixar X_SERVER_URL e XAI_API_KEY em branco,
148+
pois o modelo será baixado do Hugging Face e consultado localmente.
149+
150+
# Clientes
151+
152+
## Discord Bot
153+
154+
Para ajuda com a configuração do seu bot no Discord, consulte aqui: https://discordjs.guide/preparations/setting-up-a-bot-application.html
155+
156+
# Desenvolvimento
157+
158+
## Testando
159+
160+
Para executar a suíte de testes:
161+
162+
```bash
163+
pnpm test # Executar os testes uma vez
164+
pnpm test:watch # Executar os testes no modo de observação/monitoramento (watch mode)
165+
```
166+
167+
Para testes específicos de banco de dados:
168+
169+
```bash
170+
pnpm test:sqlite # Rode testes com SQLite
171+
pnpm test:sqljs # Rode testes com SQL.js
172+
```
173+
174+
Os testes são escritos usando o Jest e podem ser encontrados nos arquivos. O ambiente de teste está configurado para:
175+
176+
- Carregar variáveis de ambiente do arquivo `.env.test`
177+
- Usar um tempo limite de 2 minutos para testes de longa duração
178+
- Suportar módulos ESM
179+
- Executar os testes em sequência (--runInBand)
180+
181+
Para criar novos testes, adicione um arquivo `.test.ts` ao lado do código que você está testando.
182+
183+
## Atualizações da Documentação
184+
185+
Por favor, verifique se a documentação fornecida está correta. Para fazer isso, execute o serviço de documentação (docs) abaixo.
186+
187+
```console
188+
docker compose -f docker-compose-docs.yaml up --build
189+
```
190+
191+
O servidor do Docusaurus será iniciado e você poderá verificar a documentação localmente em https://localhost:3000/eliza.

docs/api/classes/DatabaseAdapter.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Retrieves memories based on the specified parameters.
194194

195195
**params**
196196

197-
An object containing parameters for the memory retrieval.
197+
An object containing parameters for memory retrieval.
198198

199199
**params.agentId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`
200200

@@ -300,7 +300,7 @@ An object containing parameters for the embedding retrieval.
300300

301301
`Promise`\<`object`[]\>
302302

303-
A Promise that resolves to an array of objects containing embeddings and levenshtein scores.
303+
A Promise that resolves to an array of objects containing embeddings and Levenshtein scores.
304304

305305
#### Implementation of
306306

0 commit comments

Comments
 (0)