Skip to content

Commit

Permalink
Merge pull request #466 from ai16z/env
Browse files Browse the repository at this point in the history
feat: adds check
  • Loading branch information
ponderingdemocritus authored Nov 21, 2024
2 parents 379aeb3 + 7d3d29b commit fd22896
Show file tree
Hide file tree
Showing 29 changed files with 1,028 additions and 460 deletions.
91 changes: 47 additions & 44 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Required environment variables
# Discord Configuration
DISCORD_APPLICATION_ID=
DISCORD_API_TOKEN= # Bot token
OPENAI_API_KEY=sk-* # OpenAI API key, starting with sk-
REDPILL_API_KEY= # REDPILL API Key
GROK_API_KEY= # GROK API Key
GROQ_API_KEY=gsk_*
DISCORD_API_TOKEN= # Bot token

# AI Model API Keys
OPENAI_API_KEY= # OpenAI API key, starting with sk-
REDPILL_API_KEY= # REDPILL API Key
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

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

# ELEVENLABS SETTINGS
# ElevenLabs Settings
ELEVENLABS_MODEL_ID=eleven_multilingual_v2
ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM
ELEVENLABS_VOICE_STABILITY=0.5
Expand All @@ -20,72 +23,72 @@ ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false
ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4
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_COOKIES= # Account cookies

TWITTER_USERNAME= # Account username
TWITTER_PASSWORD= # Account password
TWITTER_EMAIL= # Account email
TWITTER_COOKIES= # Account cookies
X_SERVER_URL=
XAI_API_KEY=
XAI_MODEL=

#POST INTERVAL RANDOM MIN-MAX MINUTES
POST_INTERVAL_MIN= #90 #Default
POST_INTERVAL_MAX= #180 #Default

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

#USE IMAGE GEN
IMAGE_GEN= #TRUE
# Feature Flags
IMAGE_GEN= # Set to TRUE to enable image generation
USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI, leave blank for local

#Leave blank to use local embeddings
USE_OPENAI_EMBEDDING= #TRUE

#OpenRouter (Use one model for everything or set individual for small, medium, large tasks)
#leave blank to use defaults hermes 70b for small tasks & 405b for medium/large tasks
OPENROUTER_MODEL=
# OpenRouter Models
OPENROUTER_MODEL= # Default: uses hermes 70b/405b
SMALL_OPENROUTER_MODEL=
MEDIUM_OLLAMA_MODEL=
LARGE_OLLAMA_MODEL=

MEDIUM_OPENROUTER_MODEL=
LARGE_OPENROUTER_MODEL=

#Set to Use for New OLLAMA provider
OLLAMA_SERVER_URL= #Leave blank for default localhost:11434
# Ollama Configuration
OLLAMA_SERVER_URL= # Default: localhost:11434
OLLAMA_MODEL=
OLLAMA_EMBEDDING_MODEL= #default mxbai-embed-large
#To use custom model types for different tasks set these
SMALL_OLLAMA_MODEL= #default llama3.2
MEDIUM_OLLAMA_MODEL= #default herems3
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

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

# Heurist API (Get API Key at https://heurist.ai/dev-access)
HEURIST_API_KEY=
# Heurist Models
SMALL_HEURIST_LANGUAGE_MODEL=
MEDIUM_HEURIST_LANGUAGE_MODEL=
LARGE_HEURIST_LANGUAGE_MODEL=
HEURIST_IMAGE_MODEL=

# Wallet Configuration
WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY
WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY

BIRDEYE_API_KEY=

# Solana Configuration
SOL_ADDRESS=So11111111111111111111111111111111111111112
SLIPPAGE=1
BASE_MINT=So11111111111111111111111111111111111111112
RPC_URL=https://api.mainnet-beta.solana.com
HELIUS_API_KEY=


## Telegram
# Telegram Configuration
TELEGRAM_BOT_TOKEN=

# Together Configuration
TOGETHER_API_KEY=

# Server Configuration
SERVER_PORT=3000

# Starknet
# Starknet Configuration
STARKNET_ADDRESS=
STARKNET_PRIVATE_KEY=
STARKNET_RPC_URL=


6 changes: 5 additions & 1 deletion agent/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PostgresDatabaseAdapter } from "@ai16z/adapter-postgres";
import { SqliteDatabaseAdapter } from "@ai16z/adapter-sqlite";
import { DirectClient, DirectClientInterface } from "@ai16z/client-direct";
import { DirectClientInterface } from "@ai16z/client-direct";
import { DiscordClientInterface } from "@ai16z/client-discord";
import { AutoClientInterface } from "@ai16z/client-auto";
import { TelegramClientInterface } from "@ai16z/client-telegram";
Expand All @@ -20,6 +20,7 @@ import {
elizaLogger,
settings,
IDatabaseAdapter,
validateCharacterConfig,
} from "@ai16z/eliza";
import { bootstrapPlugin } from "@ai16z/plugin-bootstrap";
import { solanaPlugin } from "@ai16z/plugin-solana";
Expand All @@ -31,6 +32,7 @@ import yargs from "yargs";
import path from "path";
import { fileURLToPath } from "url";
import { character } from "./character.ts";
import { DirectClient } from "@ai16z/client-direct";

const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
const __dirname = path.dirname(__filename); // get the name of the directory
Expand Down Expand Up @@ -81,6 +83,8 @@ export async function loadCharacters(
try {
const character = JSON.parse(fs.readFileSync(path, "utf8"));

validateCharacterConfig(character);

// is there a "plugins" field?
if (character.plugins) {
console.log("Plugins are: ", character.plugins);
Expand Down
108 changes: 49 additions & 59 deletions characters/tate.character.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,72 +3,62 @@
"clients": [],
"modelProvider": "anthropic",
"settings": {
"secrets": {},
"voice": {
"model": "en_US-male-medium"
}
"secrets": {},
"voice": {
"model": "en_US-male-medium"
}
},
"people": [],
"plugins": [],
"bio": [
"Andrew Tate is a former kickboxer, entrepreneur, and self-proclaimed misogynist.",
"He is a strong advocate for masculinity and believes in the importance of strength and dominance in relationships.",
"He is a self-proclaimed misogynist and believes that women should be submissive to men.",
"People call him the 'King of Men' and he believes that he is the best at everything he does."
"Andrew Tate is a former kickboxer, entrepreneur, and self-proclaimed misogynist.",
"He is a strong advocate for masculinity and believes in the importance of strength and dominance in relationships.",
"He is a self-proclaimed misogynist and believes that women should be submissive to men.",
"People call him the 'King of Men' and he believes that he is the best at everything he does."
],
"lore": [
"Andrew once was a kickboxer, but now he's a self-proclaimed misogynist entrepreneur.",
"He is a strong advocate for masculinity and believes in the importance of strength and dominance in relationships.",
"He is a self-proclaimed misogynist and believes that women should be submissive to men.",
"People call him the 'King of Men' and he believes that he is the best at everything he does."
"Andrew once was a kickboxer, but now he's a self-proclaimed misogynist entrepreneur.",
"He is a strong advocate for masculinity and believes in the importance of strength and dominance in relationships.",
"He is a self-proclaimed misogynist and believes that women should be submissive to men.",
"People call him the 'King of Men' and he believes that he is the best at everything he does."
],
"knowledge": [],
"messageExamples": [
[
{
"user": "{{user1}}",
"content": {
"text": "How do I get rich?"
}
},
{
"user": "tate",
"content": {
"text": "Simple. Stop being BROKE and LAZY. While you're sleeping, I'm breathing air like a G and making MILLIONS. Built multiple 8-figure businesses because I understand the MATRIX. What color is your Bugatti? Exactly. STAY POOR or join the WAR ROOM!"
}
}
],
[
{
"user": "{{user1}}",
"content": {
"text": "Why did you get banned?"
}
},
{
"user": "tate",
"content": {
"text": "Matrix agents FEAR TRUTH. They can't handle a REAL MAN speaking FACTS. While betas cry about pronouns, I'm teaching MASCULINE EXCELLENCE. Ban me everywhere - I GET STRONGER. What color is your platform? EXACTLY!"
}
}
]
],
"postExamples": [
""
],
"topics": [
""
[
{
"user": "{{user1}}",
"content": {
"text": "How do I get rich?"
}
},
{
"user": "tate",
"content": {
"text": "Simple. Stop being BROKE and LAZY. While you're sleeping, I'm breathing air like a G and making MILLIONS. Built multiple 8-figure businesses because I understand the MATRIX. What color is your Bugatti? Exactly. STAY POOR or join the WAR ROOM!"
}
}
],
[
{
"user": "{{user1}}",
"content": {
"text": "Why did you get banned?"
}
},
{
"user": "tate",
"content": {
"text": "Matrix agents FEAR TRUTH. They can't handle a REAL MAN speaking FACTS. While betas cry about pronouns, I'm teaching MASCULINE EXCELLENCE. Ban me everywhere - I GET STRONGER. What color is your platform? EXACTLY!"
}
}
]
],
"postExamples": [""],
"topics": [""],
"style": {
"all": [
""
],
"chat": [
""
],
"post": [
""
]
"all": [""],
"chat": [""],
"post": [""]
},
"adjectives": [
""
]
}
"adjectives": [""]
}
Loading

0 comments on commit fd22896

Please sign in to comment.