Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

now working with ollama locally #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Required environment variables
DISCORD_APPLICATION_ID=
DISCORD_API_TOKEN= # Bot token
OPENAI_API_KEY=sk-* # OpenAI API key, starting with sk-
#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_*
Expand Down Expand Up @@ -39,7 +39,7 @@ POST_INTERVAL_MAX= #180 #Default
IMAGE_GEN= #TRUE

#Leave blank to use local embeddings
USE_OPENAI_EMBEDDING= #TRUE
#USE_OPENAI_EMBEDDING= #FALSE

#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
Expand All @@ -50,8 +50,8 @@ LARGE_OLLAMA_MODEL=


#Set to Use for New OLLAMA provider
OLLAMA_SERVER_URL= #Leave blank for default localhost:11434
OLLAMA_MODEL=
#OLLAMA_SERVER_URL= #Leave blank for default localhost:11434
OLLAMA_MODEL=temp1
OLLAMA_EMBEDDING_MODEL= #default mxbai-embed-large
#To use custom model types for different tasks set these
SMALL_OLLAMA_MODEL= #default llama3.2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
.env
node_modules

db.sqlite
db.sqlite
/dist/
48 changes: 46 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
# Eliza
# Ollama Eliza

## pnpm list

```
Legend: production dependency, optional only, dev only

@ai16z/[email protected] /mnt/data1/nix/time/2025/01/01/eliza-starter

dependencies:
@ai16z/adapter-postgres 0.1.4-alpha.3
@ai16z/plugin-image-generation 0.1.4-alpha.3
@ai16z/adapter-sqlite 0.1.4-alpha.3
@ai16z/plugin-node 0.1.4-alpha.3
@ai16z/client-auto 0.1.4-alpha.3
@ai16z/plugin-solana 0.1.4-alpha.3
@ai16z/client-direct 0.1.4-alpha.3
@ai16z/plugin-starknet 0.1.4-alpha.3
@ai16z/client-discord 0.1.4-alpha.3
better-sqlite3 11.5.0
@ai16z/client-telegram 0.1.4-alpha.3
readline 1.3.0
@ai16z/client-twitter 0.1.4-alpha.3
ws 8.18.0
@ai16z/eliza 0.1.4-alpha.3
yargs 17.7.2
@ai16z/plugin-bootstrap 0.1.4-alpha.3

devDependencies:
ts-node 10.9.2
tsup 8.3.5
typescript 5.6.3
```

My steps
```
nvm install --lts
nvm use --lts
rm -rf node_modules/
rm -rf dist/
pnpm i && pnpm build && pnpm start
pnpm rebuild
pnpm start --characters="characters/eliza.character.json"
```


## Edit the character files

Expand All @@ -7,7 +51,7 @@ Open `agent/src/character.ts` to modify the default character. Uncomment and edi
### Custom characters

To load custom characters instead:
- Use `pnpm start --characters="path/to/your/character.json"`
- Use `pnpm start --characters="characters/eliza.character.json"`
- Multiple character files can be loaded simultaneously

### Add clients
Expand Down
4 changes: 2 additions & 2 deletions characters/eliza.character.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Eliza",
"plugins": [],
"clients": [],
"modelProvider": "openrouter",
"modelProvider": "ollama",
"settings": {
"secrets": {},
"voice": {
Expand Down Expand Up @@ -392,4 +392,4 @@
"dive deeper into stuff when its interesting"
]
}
}
}