Skip to content

Commit abc187b

Browse files
authored
Merge pull request #677 from augchan42/feature/bge-embeddings
feat: improve embeddings, models and connectivity
2 parents 02bf54a + 2d7e1b0 commit abc187b

23 files changed

+1757
-725
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.env.example

+38-41
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
# Discord Configuration
22
DISCORD_APPLICATION_ID=
3-
DISCORD_API_TOKEN= # Bot token
4-
DISCORD_VOICE_CHANNEL_ID= # The ID of the voice channel the bot should join (optional)
3+
DISCORD_API_TOKEN= # Bot token
4+
DISCORD_VOICE_CHANNEL_ID= # The ID of the voice channel the bot should join (optional)
55

66
# AI Model API Keys
7-
OPENAI_API_KEY= # OpenAI API key, starting with sk-
7+
OPENAI_API_KEY= # OpenAI API key, starting with sk-
88

99
ETERNALAI_URL=
1010
ETERNALAI_API_KEY=
1111

12-
13-
GROK_API_KEY= # GROK API Key
14-
GROQ_API_KEY= # Starts with gsk_
12+
GROK_API_KEY= # GROK API Key
13+
GROQ_API_KEY= # Starts with gsk_
1514
OPENROUTER_API_KEY=
16-
GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key
15+
GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key
1716

1817
# Speech Synthesis
19-
ELEVENLABS_XI_API_KEY= # API key from elevenlabs
18+
ELEVENLABS_XI_API_KEY= # API key from elevenlabs
2019

2120
# ElevenLabs Settings
2221
ELEVENLABS_MODEL_ID=eleven_multilingual_v2
@@ -30,53 +29,53 @@ ELEVENLABS_OUTPUT_FORMAT=pcm_16000
3029

3130
# Twitter/X Configuration
3231
TWITTER_DRY_RUN=false
33-
TWITTER_USERNAME= # Account username
34-
TWITTER_PASSWORD= # Account password
35-
TWITTER_EMAIL= # Account email
32+
TWITTER_USERNAME= # Account username
33+
TWITTER_PASSWORD= # Account password
34+
TWITTER_EMAIL= # Account email
3635
TWITTER_2FA_SECRET=
37-
TWITTER_COOKIES= # Account cookies
36+
TWITTER_COOKIES= # Account cookies
3837
X_SERVER_URL=
3938
XAI_API_KEY=
4039
XAI_MODEL=
4140

4241
# Post Interval Settings (in minutes)
43-
POST_INTERVAL_MIN= # Default: 90
44-
POST_INTERVAL_MAX= # Default: 180
42+
POST_INTERVAL_MIN= # Default: 90
43+
POST_INTERVAL_MAX= # Default: 180
4544
POST_IMMEDIATELY=
4645

4746
# Feature Flags
48-
IMAGE_GEN= # Set to TRUE to enable image generation
49-
USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI, leave blank for local
47+
IMAGE_GEN= # Set to TRUE to enable image generation
48+
USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI/1536, leave blank for local
49+
USE_OLLAMA_EMBEDDING= # Set to TRUE for OLLAMA/1024, leave blank for local
5050

5151
# OpenRouter Models
52-
OPENROUTER_MODEL= # Default: uses hermes 70b/405b
52+
OPENROUTER_MODEL= # Default: uses hermes 70b/405b
5353
SMALL_OPENROUTER_MODEL=
5454
MEDIUM_OPENROUTER_MODEL=
5555
LARGE_OPENROUTER_MODEL=
5656

57-
5857
# REDPILL Configuration
59-
# https://docs.red-pill.ai/get-started/supported-models
60-
REDPILL_API_KEY= # REDPILL API Key
58+
# https://docs.red-pill.ai/get-started/supported-models
59+
REDPILL_API_KEY= # REDPILL API Key
6160
REDPILL_MODEL=
62-
SMALL_REDPILL_MODEL= # Default: gpt-4o-mini
63-
MEDIUM_REDPILL_MODEL= # Default: gpt-4o
64-
LARGE_REDPILL_MODEL= # Default: gpt-4o
61+
SMALL_REDPILL_MODEL= # Default: gpt-4o-mini
62+
MEDIUM_REDPILL_MODEL= # Default: gpt-4o
63+
LARGE_REDPILL_MODEL= # Default: gpt-4o
6564

6665
# Ollama Configuration
67-
OLLAMA_SERVER_URL= # Default: localhost:11434
66+
OLLAMA_SERVER_URL= # Default: localhost:11434
6867
OLLAMA_MODEL=
69-
OLLAMA_EMBEDDING_MODEL= # Default: mxbai-embed-large
70-
SMALL_OLLAMA_MODEL= # Default: llama3.2
71-
MEDIUM_OLLAMA_MODEL= # Default: hermes3
72-
LARGE_OLLAMA_MODEL= # Default: hermes3:70b
68+
OLLAMA_EMBEDDING_MODEL= # Default: mxbai-embed-large
69+
SMALL_OLLAMA_MODEL= # Default: llama3.2
70+
MEDIUM_OLLAMA_MODEL= # Default: hermes3
71+
LARGE_OLLAMA_MODEL= # Default: hermes3:70b
7372

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

7776
# API Keys
78-
ANTHROPIC_API_KEY= # For Claude
79-
HEURIST_API_KEY= # Get from https://heurist.ai/dev-access
77+
ANTHROPIC_API_KEY= # For Claude
78+
HEURIST_API_KEY= # Get from https://heurist.ai/dev-access
8079

8180
# Heurist Models
8281
SMALL_HEURIST_LANGUAGE_MODEL=
@@ -122,18 +121,17 @@ STARKNET_RPC_URL=
122121
# Intiface Configuration
123122
INTIFACE_WEBSOCKET_URL=ws://localhost:12345
124123

125-
126124
# Farcaster
127125
FARCASTER_HUB_URL=
128126
FARCASTER_FID=
129127
FARCASTER_PRIVATE_KEY=
130128

131129
# Coinbase
132130
COINBASE_COMMERCE_KEY= # from coinbase developer portal
133-
COINBASE_API_KEY= # from coinbase developer portal
134-
COINBASE_PRIVATE_KEY= # from coinbase developer portal
131+
COINBASE_API_KEY= # from coinbase developer portal
132+
COINBASE_PRIVATE_KEY= # from coinbase developer portal
135133
# 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
136-
COINBASE_GENERATED_WALLET_ID= # not your address but the wallet id from generating a wallet through the plugin
134+
COINBASE_GENERATED_WALLET_ID= # not your address but the wallet id from generating a wallet through the plugin
137135
COINBASE_GENERATED_WALLET_HEX_SEED= # not your address but the wallet hex seed from generating a wallet through the plugin and calling export
138136

139137
# Conflux Configuration
@@ -149,7 +147,6 @@ ZEROG_EVM_RPC=
149147
ZEROG_PRIVATE_KEY=
150148
ZEROG_FLOW_ADDRESS=
151149

152-
153150
# Coinbase
154151
COINBASE_COMMERCE_KEY=
155152
COINBASE_API_KEY=
@@ -170,11 +167,11 @@ FAL_API_KEY=
170167
FAL_AI_LORA_PATH=
171168

172169
# WhatsApp Cloud API Configuration
173-
WHATSAPP_ACCESS_TOKEN= # Permanent access token from Facebook Developer Console
174-
WHATSAPP_PHONE_NUMBER_ID= # Phone number ID from WhatsApp Business API
175-
WHATSAPP_BUSINESS_ACCOUNT_ID= # Business Account ID from Facebook Business Manager
176-
WHATSAPP_WEBHOOK_VERIFY_TOKEN= # Custom string for webhook verification
177-
WHATSAPP_API_VERSION=v17.0 # WhatsApp API version (default: v17.0)
170+
WHATSAPP_ACCESS_TOKEN= # Permanent access token from Facebook Developer Console
171+
WHATSAPP_PHONE_NUMBER_ID= # Phone number ID from WhatsApp Business API
172+
WHATSAPP_BUSINESS_ACCOUNT_ID= # Business Account ID from Facebook Business Manager
173+
WHATSAPP_WEBHOOK_VERIFY_TOKEN= # Custom string for webhook verification
174+
WHATSAPP_API_VERSION=v17.0 # WhatsApp API version (default: v17.0)
178175

179176
# ICP
180177
INTERNET_COMPUTER_PRIVATE_KEY=

.eslintrc.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"plugins": [
3+
"@stylistic"
4+
],
5+
"extends": [
6+
"next/core-web-vitals",
7+
"plugin:@stylistic/recommended-extends"
8+
],
9+
"rules": {
10+
"@stylistic/indent": [
11+
"error",
12+
4,
13+
{
14+
"SwitchCase": 1
15+
}
16+
],
17+
"@stylistic/no-tabs": "error",
18+
"@stylistic/member-delimiter-style": [
19+
"error",
20+
{
21+
"multiline": {
22+
"delimiter": "semi",
23+
"requireLast": true
24+
},
25+
"singleline": {
26+
"delimiter": "semi",
27+
"requireLast": false
28+
}
29+
}
30+
],
31+
"@stylistic/eol-last": [
32+
"error",
33+
"always"
34+
],
35+
"@stylistic/multiline-ternary": "off",
36+
"@stylistic/semi": [
37+
"error",
38+
"always"
39+
],
40+
"@stylistic/quotes": "off",
41+
"@stylistic/comma-dangle": "off",
42+
"@stylistic/brace-style": [
43+
"error",
44+
"1tbs"
45+
]
46+
}
47+
}

.vscode/settings.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": "explicit"
4+
},
5+
"editor.formatOnSave": true,
6+
"editor.defaultFormatter": "esbenp.prettier-vscode",
7+
"editor.insertSpaces": true,
8+
"editor.detectIndentation": false,
9+
"editor.tabSize": 4,
10+
"eslint.format.enable": true,
11+
"javascript.format.enable": false,
12+
"typescript.format.enable": false,
13+
"files.trimTrailingWhitespace": true,
14+
"editor.trimAutoWhitespace": true,
15+
"[properties]": {
16+
"editor.defaultFormatter": "foxundermoon.shell-format"
17+
},
18+
"[typescript]": {
19+
"editor.defaultFormatter": "esbenp.prettier-vscode"
20+
},
21+
"[typescriptreact]": {
22+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
23+
},
24+
"[javascriptreact]": {
25+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
26+
},
27+
"[jsonc]": {
28+
"editor.defaultFormatter": "vscode.json-language-features"
29+
},
30+
"[javascript]": {
31+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
32+
},
33+
"[scss]": {
34+
"editor.defaultFormatter": "vscode.css-language-features"
35+
},
36+
"[dotenv]": {
37+
"editor.defaultFormatter": "foxundermoon.shell-format"
38+
},
39+
"files.associations": {
40+
"*.css": "tailwindcss"
41+
},
42+
"[shellscript]": {
43+
"editor.defaultFormatter": "foxundermoon.shell-format"
44+
}
45+
}

agent/package.json

+12-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@
44
"main": "src/index.ts",
55
"type": "module",
66
"scripts": {
7-
"start": "node --loader ts-node/esm src/index.ts",
8-
"dev": "node --loader ts-node/esm src/index.ts",
7+
"start": "node --enable-source-maps --loader ts-node/esm src/index.ts",
8+
"dev": "tsc && nodemon --watch src --watch ../core/dist --ext ts,json --exec 'node --enable-source-maps --loader ts-node/esm' src/index.ts",
9+
"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",
910
"check-types": "tsc --noEmit",
1011
"start:service:all": "pm2 start pnpm --name=\"all\" --restart-delay=3000 --max-restarts=10 -- run start:all",
1112
"stop:service:all": "pm2 stop all",
1213
"start:all": "node --loader ts-node/esm src/index.ts --characters=\"../characters/eliza.json\",\"../characters/degenspartan.json\",\"../characters/ruby.json\",\"../characters/pmairca.json\""
1314
},
15+
"nodemonConfig": {
16+
"watch": [
17+
"src",
18+
"../core/dist"
19+
],
20+
"ext": "ts,json",
21+
"exec": "node --enable-source-maps --loader ts-node/esm src/index.ts"
22+
},
1423
"dependencies": {
1524
"@ai16z/adapter-postgres": "workspace:*",
1625
"@ai16z/adapter-sqlite": "workspace:*",
@@ -39,4 +48,4 @@
3948
"ts-node": "10.9.2",
4049
"tsup": "8.3.5"
4150
}
42-
}
51+
}

0 commit comments

Comments
 (0)