Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-birdeye-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
swizzmagik committed Jan 3, 2025
2 parents a7c9554 + cddc9ee commit 0f2a027
Show file tree
Hide file tree
Showing 70 changed files with 1,474 additions and 583 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ IMAGE_OPENAI_MODEL= # Default: dall-e-3
ETERNALAI_URL=
ETERNALAI_MODEL= # Default: "neuralmagic/Meta-Llama-3.1-405B-Instruct-quantized.w4a16"
ETERNALAI_API_KEY=
ETERNAL_AI_LOG_REQUEST=false #Default: false

GROK_API_KEY= # GROK API Key
GROQ_API_KEY= # Starts with gsk_
Expand Down Expand Up @@ -368,3 +369,7 @@ CRONOSZKEVM_PRIVATE_KEY=

# Fuel Ecosystem (FuelVM)
FUEL_WALLET_PRIVATE_KEY=

# Tokenizer Settings
TOKENIZER_MODEL= # Specify the tokenizer model to be used.
TOKENIZER_TYPE= # Options: tiktoken (for OpenAI models) or auto (AutoTokenizer from Hugging Face for non-OpenAI models). Default: tiktoken.
3 changes: 2 additions & 1 deletion client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ export default defineConfig({
},
},
server: {
host: true,
proxy: {
"/api": {
target: `http://localhost:${process.env.SERVER_PORT || 3000}`,
target: `http://127.0.0.1:${process.env.SERVER_PORT || 3000}`,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-postgres/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-postgres",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@types/pg": "8.11.10",
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-redis/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-redis",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"ioredis": "5.4.2"
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-sqlite/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-sqlite",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@types/better-sqlite3": "7.6.12",
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-sqljs/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-sqljs",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@types/sql.js": "1.4.9",
Expand Down
16 changes: 15 additions & 1 deletion packages/adapter-supabase/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/adapter-supabase",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@supabase/supabase-js": "2.46.2"
Expand Down
16 changes: 15 additions & 1 deletion packages/client-auto/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/client-auto",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@types/body-parser": "1.19.5",
Expand Down
14 changes: 14 additions & 0 deletions packages/client-direct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
"name": "@elizaos/client-direct",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"module": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@elizaos/plugin-image-generation": "workspace:*",
Expand Down
16 changes: 15 additions & 1 deletion packages/client-discord/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/client-discord",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@elizaos/plugin-node": "workspace:*",
Expand Down
13 changes: 6 additions & 7 deletions packages/client-discord/src/actions/chat_with_attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,16 @@ const summarizeAction = {

state.attachmentsWithText = attachmentsWithText;
state.objective = objective;

const template = await trimTokens(
summarizationTemplate,
chunkSize + 500,
runtime
);
const context = composeContext({
state,
// make sure it fits, we can pad the tokens a bit
// Get the model's tokenizer based on the current model being used
template: trimTokens(
summarizationTemplate,
chunkSize + 500,
(model.model[ModelClass.SMALL] ||
"gpt-4o-mini") as TiktokenModel // Use the same model as generation; Fallback if no SMALL model configured
),
template,
});

const summary = await generateText({
Expand Down
11 changes: 6 additions & 5 deletions packages/client-discord/src/actions/summarize_conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,15 @@ const summarizeAction = {
const chunk = chunks[i];
state.currentSummary = currentSummary;
state.currentChunk = chunk;
const template = await trimTokens(
summarizationTemplate,
chunkSize + 500,
runtime
);
const context = composeContext({
state,
// make sure it fits, we can pad the tokens a bit
template: trimTokens(
summarizationTemplate,
chunkSize + 500,
"gpt-4o-mini"
),
template,
});

const summary = await generateText({
Expand Down
2 changes: 1 addition & 1 deletion packages/client-discord/src/attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function generateSummary(
text: string
): Promise<{ title: string; description: string }> {
// make sure text is under 128k characters
text = trimTokens(text, 100000, "gpt-4o-mini"); // TODO: clean this up
text = await trimTokens(text, 100000, runtime);

const prompt = `Please generate a concise summary for the following text:
Expand Down
2 changes: 1 addition & 1 deletion packages/client-discord/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function generateSummary(
text: string
): Promise<{ title: string; description: string }> {
// make sure text is under 128k characters
text = trimTokens(text, 100000, "gpt-4o-mini"); // TODO: clean this up
text = await trimTokens(text, 100000, runtime);

const prompt = `Please generate a concise summary for the following text:
Expand Down
16 changes: 15 additions & 1 deletion packages/client-farcaster/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/client-farcaster",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@neynar/nodejs-sdk": "^2.0.3"
Expand Down
16 changes: 15 additions & 1 deletion packages/client-github/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/client-github",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@octokit/rest": "20.1.1",
Expand Down
16 changes: 15 additions & 1 deletion packages/client-lens/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
{
"name": "@elizaos/client-lens",
"version": "0.1.7-alpha.2",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"dependencies": {
"@elizaos/core": "workspace:*",
"@lens-protocol/client": "2.2.0",
Expand Down
16 changes: 15 additions & 1 deletion packages/client-slack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,23 @@
"name": "@elizaos/client-slack",
"version": "0.1.7-alpha.2",
"description": "Slack client plugin for Eliza framework",
"main": "dist/index.js",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"@elizaos/source": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup src/index.ts --format esm --dts",
"test": "jest",
Expand Down
Loading

0 comments on commit 0f2a027

Please sign in to comment.