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: add Jina embeddings integration #2172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chikingsley
Copy link

Description

Add Jina AI embeddings support to mem0. This integration allows users to generate embeddings using Jina's API with configurable options for model selection, custom parameters, and API endpoints.

Key features:

  • Integration with Jina AI embeddings API
  • Support for custom base URL via jina_base_url config or JINA_API_BASE env var
  • Default model: jina-embeddings-v3 with 768 dimensions
  • Support for custom model parameters via model_kwargs

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit Test
    • Test default model configuration
    • Test custom model parameters
    • Test environment variable and config-based API keys
    • Test newline handling in input text
    • Test error handling for missing API key
    • Test custom base URL configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Made sure Checks passed

@CLAassistant
Copy link

CLAassistant commented Jan 22, 2025

CLA assistant check
All committers have signed the CLA.

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.

2 participants