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

feat: improve embeddings, models and connectivity #677

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

augchan42
Copy link
Contributor

  • Add multiple embedding options:
    • BGE-Small local embeddings (~70-80% of OpenAI quality)
    • Ollama embeddings support
    • Configure via env vars:
      • USE_OPENAI_EMBEDDING=true
      • USE_OLLAMA_EMBEDDING=true
      • Both case-insensitive, default to false
  • Switch to Claude 3 Haiku from Claude 3.5 Haiku
    • 4x cheaper
    • Better instruction following
    • Improved price/performance ratio
  • Enhance Postgres connectivity and reliability
  • Fix transcription error handling

Breaking changes:

  • Claude 3.5 Haiku replaced with Claude 3 Haiku
  • Embedding system now configurable via string env vars (true)

Closes #604

Discord username

hosermage

- Add multiple embedding options:
  - BGE-Small local embeddings (~70-80% of OpenAI quality)
  - Ollama embeddings support
  - Configure via env vars:
    - USE_OPENAI_EMBEDDING=true
    - USE_OLLAMA_EMBEDDING=true
    - Both case-insensitive, default to false
- Switch to Claude 3 Haiku from Claude 3.5 Haiku
  - 4x cheaper
  - Better instruction following
  - Improved price/performance ratio
- Enhance Postgres connectivity and reliability
- Fix transcription error handling

Breaking changes:
- Claude 3.5 Haiku replaced with Claude 3 Haiku
- Embedding system now configurable via string env vars (true)

Closes elizaOS#604
@lalalune lalalune merged commit abc187b into elizaOS:main Nov 29, 2024
1 of 2 checks passed
@augchan42
Copy link
Contributor Author

Check the .env.example file for this section:

# Feature Flags
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

If using OLLAMA, then set USE_OLLAMA_EMBEDDING=true and USE_OPENAI_EMBEDDING blank

If you want to use BGE/384 (local embeddings using BAAI General Embeddings small model)
Then leave both USE_OLLAMA_EMBEDDING and USE_OPENAI_EMBEDDING blank.

These embeddings are for persisting and searching the memories table and are separate and distinct from LLM inference, and can be mixed and matched (I use Anthropic for inference, BGE for embeddings)

shakkernerd added a commit that referenced this pull request Nov 30, 2024
chore: remove unused packages introduced in #677
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for local embeddings BGE/384
2 participants