Skip to content

Commit

Permalink
Merge pull request elizaOS#677 from augchan42/feature/bge-embeddings
Browse files Browse the repository at this point in the history
feat: improve embeddings, models and connectivity
  • Loading branch information
lalalune authored Nov 29, 2024
2 parents 02bf54a + 2d7e1b0 commit abc187b
Show file tree
Hide file tree
Showing 23 changed files with 1,757 additions and 725 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
79 changes: 38 additions & 41 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# Discord Configuration
DISCORD_APPLICATION_ID=
DISCORD_API_TOKEN= # Bot token
DISCORD_VOICE_CHANNEL_ID= # The ID of the voice channel the bot should join (optional)
DISCORD_API_TOKEN= # Bot token
DISCORD_VOICE_CHANNEL_ID= # The ID of the voice channel the bot should join (optional)

# AI Model API Keys
OPENAI_API_KEY= # OpenAI API key, starting with sk-
OPENAI_API_KEY= # OpenAI API key, starting with sk-

ETERNALAI_URL=
ETERNALAI_API_KEY=


GROK_API_KEY= # GROK API Key
GROQ_API_KEY= # Starts with gsk_
GROK_API_KEY= # GROK API Key
GROQ_API_KEY= # Starts with gsk_
OPENROUTER_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key
GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key

# Speech Synthesis
ELEVENLABS_XI_API_KEY= # API key from elevenlabs
ELEVENLABS_XI_API_KEY= # API key from elevenlabs

# ElevenLabs Settings
ELEVENLABS_MODEL_ID=eleven_multilingual_v2
Expand All @@ -30,53 +29,53 @@ ELEVENLABS_OUTPUT_FORMAT=pcm_16000

# Twitter/X Configuration
TWITTER_DRY_RUN=false
TWITTER_USERNAME= # Account username
TWITTER_PASSWORD= # Account password
TWITTER_EMAIL= # Account email
TWITTER_USERNAME= # Account username
TWITTER_PASSWORD= # Account password
TWITTER_EMAIL= # Account email
TWITTER_2FA_SECRET=
TWITTER_COOKIES= # Account cookies
TWITTER_COOKIES= # Account cookies
X_SERVER_URL=
XAI_API_KEY=
XAI_MODEL=

# Post Interval Settings (in minutes)
POST_INTERVAL_MIN= # Default: 90
POST_INTERVAL_MAX= # Default: 180
POST_INTERVAL_MIN= # Default: 90
POST_INTERVAL_MAX= # Default: 180
POST_IMMEDIATELY=

# Feature Flags
IMAGE_GEN= # Set to TRUE to enable image generation
USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI, leave blank for local
IMAGE_GEN= # Set to TRUE to enable image generation
USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI/1536, leave blank for local
USE_OLLAMA_EMBEDDING= # Set to TRUE for OLLAMA/1024, leave blank for local

# OpenRouter Models
OPENROUTER_MODEL= # Default: uses hermes 70b/405b
OPENROUTER_MODEL= # Default: uses hermes 70b/405b
SMALL_OPENROUTER_MODEL=
MEDIUM_OPENROUTER_MODEL=
LARGE_OPENROUTER_MODEL=


# REDPILL Configuration
# https://docs.red-pill.ai/get-started/supported-models
REDPILL_API_KEY= # REDPILL API Key
# https://docs.red-pill.ai/get-started/supported-models
REDPILL_API_KEY= # REDPILL API Key
REDPILL_MODEL=
SMALL_REDPILL_MODEL= # Default: gpt-4o-mini
MEDIUM_REDPILL_MODEL= # Default: gpt-4o
LARGE_REDPILL_MODEL= # Default: gpt-4o
SMALL_REDPILL_MODEL= # Default: gpt-4o-mini
MEDIUM_REDPILL_MODEL= # Default: gpt-4o
LARGE_REDPILL_MODEL= # Default: gpt-4o

# Ollama Configuration
OLLAMA_SERVER_URL= # Default: localhost:11434
OLLAMA_SERVER_URL= # Default: localhost:11434
OLLAMA_MODEL=
OLLAMA_EMBEDDING_MODEL= # Default: mxbai-embed-large
SMALL_OLLAMA_MODEL= # Default: llama3.2
MEDIUM_OLLAMA_MODEL= # Default: hermes3
LARGE_OLLAMA_MODEL= # Default: hermes3:70b
OLLAMA_EMBEDDING_MODEL= # Default: mxbai-embed-large
SMALL_OLLAMA_MODEL= # Default: llama3.2
MEDIUM_OLLAMA_MODEL= # Default: hermes3
LARGE_OLLAMA_MODEL= # Default: hermes3:70b

#LlamaLocal Configuration
LLAMALOCAL_PATH= # Default: "" which is the current directory in plugin-node/dist/ which gets destroyed and recreated on every build
LLAMALOCAL_PATH= # Default: "" which is the current directory in plugin-node/dist/ which gets destroyed and recreated on every build

# API Keys
ANTHROPIC_API_KEY= # For Claude
HEURIST_API_KEY= # Get from https://heurist.ai/dev-access
ANTHROPIC_API_KEY= # For Claude
HEURIST_API_KEY= # Get from https://heurist.ai/dev-access

# Heurist Models
SMALL_HEURIST_LANGUAGE_MODEL=
Expand Down Expand Up @@ -122,18 +121,17 @@ STARKNET_RPC_URL=
# Intiface Configuration
INTIFACE_WEBSOCKET_URL=ws://localhost:12345


# Farcaster
FARCASTER_HUB_URL=
FARCASTER_FID=
FARCASTER_PRIVATE_KEY=

# Coinbase
COINBASE_COMMERCE_KEY= # from coinbase developer portal
COINBASE_API_KEY= # from coinbase developer portal
COINBASE_PRIVATE_KEY= # from coinbase developer portal
COINBASE_API_KEY= # from coinbase developer portal
COINBASE_PRIVATE_KEY= # from coinbase developer portal
# if not configured it will be generated and written to runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_ID and runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_HEX_SEED
COINBASE_GENERATED_WALLET_ID= # not your address but the wallet id from generating a wallet through the plugin
COINBASE_GENERATED_WALLET_ID= # not your address but the wallet id from generating a wallet through the plugin
COINBASE_GENERATED_WALLET_HEX_SEED= # not your address but the wallet hex seed from generating a wallet through the plugin and calling export

# Conflux Configuration
Expand All @@ -149,7 +147,6 @@ ZEROG_EVM_RPC=
ZEROG_PRIVATE_KEY=
ZEROG_FLOW_ADDRESS=


# Coinbase
COINBASE_COMMERCE_KEY=
COINBASE_API_KEY=
Expand All @@ -170,11 +167,11 @@ FAL_API_KEY=
FAL_AI_LORA_PATH=

# WhatsApp Cloud API Configuration
WHATSAPP_ACCESS_TOKEN= # Permanent access token from Facebook Developer Console
WHATSAPP_PHONE_NUMBER_ID= # Phone number ID from WhatsApp Business API
WHATSAPP_BUSINESS_ACCOUNT_ID= # Business Account ID from Facebook Business Manager
WHATSAPP_WEBHOOK_VERIFY_TOKEN= # Custom string for webhook verification
WHATSAPP_API_VERSION=v17.0 # WhatsApp API version (default: v17.0)
WHATSAPP_ACCESS_TOKEN= # Permanent access token from Facebook Developer Console
WHATSAPP_PHONE_NUMBER_ID= # Phone number ID from WhatsApp Business API
WHATSAPP_BUSINESS_ACCOUNT_ID= # Business Account ID from Facebook Business Manager
WHATSAPP_WEBHOOK_VERIFY_TOKEN= # Custom string for webhook verification
WHATSAPP_API_VERSION=v17.0 # WhatsApp API version (default: v17.0)

# ICP
INTERNET_COMPUTER_PRIVATE_KEY=
Expand Down
47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"plugins": [
"@stylistic"
],
"extends": [
"next/core-web-vitals",
"plugin:@stylistic/recommended-extends"
],
"rules": {
"@stylistic/indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"@stylistic/no-tabs": "error",
"@stylistic/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@stylistic/eol-last": [
"error",
"always"
],
"@stylistic/multiline-ternary": "off",
"@stylistic/semi": [
"error",
"always"
],
"@stylistic/quotes": "off",
"@stylistic/comma-dangle": "off",
"@stylistic/brace-style": [
"error",
"1tbs"
]
}
}
45 changes: 45 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.tabSize": 4,
"eslint.format.enable": true,
"javascript.format.enable": false,
"typescript.format.enable": false,
"files.trimTrailingWhitespace": true,
"editor.trimAutoWhitespace": true,
"[properties]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[scss]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"[dotenv]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"files.associations": {
"*.css": "tailwindcss"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
15 changes: 12 additions & 3 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@
"main": "src/index.ts",
"type": "module",
"scripts": {
"start": "node --loader ts-node/esm src/index.ts",
"dev": "node --loader ts-node/esm src/index.ts",
"start": "node --enable-source-maps --loader ts-node/esm src/index.ts",
"dev": "tsc && nodemon --watch src --watch ../core/dist --ext ts,json --exec 'node --enable-source-maps --loader ts-node/esm' src/index.ts",
"dev:debug": "tsc && nodemon --watch src --watch ../core/dist --ext ts,json --exec 'verbose=true node --enable-source-maps --loader ts-node/esm' src/index.ts",
"check-types": "tsc --noEmit",
"start:service:all": "pm2 start pnpm --name=\"all\" --restart-delay=3000 --max-restarts=10 -- run start:all",
"stop:service:all": "pm2 stop all",
"start:all": "node --loader ts-node/esm src/index.ts --characters=\"../characters/eliza.json\",\"../characters/degenspartan.json\",\"../characters/ruby.json\",\"../characters/pmairca.json\""
},
"nodemonConfig": {
"watch": [
"src",
"../core/dist"
],
"ext": "ts,json",
"exec": "node --enable-source-maps --loader ts-node/esm src/index.ts"
},
"dependencies": {
"@ai16z/adapter-postgres": "workspace:*",
"@ai16z/adapter-sqlite": "workspace:*",
Expand Down Expand Up @@ -39,4 +48,4 @@
"ts-node": "10.9.2",
"tsup": "8.3.5"
}
}
}
Loading

0 comments on commit abc187b

Please sign in to comment.