llama-index embeddings AutoEmbeddings integration
Project description
LlamaIndex Embeddings Integration: AutoEmbeddings
AutoEmbeddings is a very useful module available within Chonkie that can initialize several different embeddings providers within one single interface:
- OpenAI
- Model2Vec
- Cohere
- Jina AI
- Sentence Transformers
You can install it with:
pip install llama-index-embeddings-autoembeddings
And then you can use it in your scripts as:
from llama_index.embeddings.autoembeddings import ChonkieAutoEmbedding
embedder = ChonkieAutoEmbedding(model_name="all-MiniLM-L6-v2")
vector = embedder.get_text_embedding(
"The quick brown fox jumps over the lazy dog."
)
print(vector)
If you want to use it with a non-local embeddings provider, you should declare the API key as an environment variable:
from llama_index.embeddings.autoembeddings import ChonkieAutoEmbedding
import os
os.environ["OPENAI_API_KEY"] = "YOUR-API-KEY"
embedder = ChonkieAutoEmbedding(model_name="text-embedding-3-large")
vector = embedder.get_text_embedding(
"The quick brown fox jumps over the lazy dog."
)
print(vector)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_embeddings_autoembeddings-0.2.1.tar.gz.
File metadata
- Download URL: llama_index_embeddings_autoembeddings-0.2.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b97253ba53a742dd805ecb729693b239d76b5c70b43c79b457b3b385bb3e1473
|
|
| MD5 |
a6d6989be93577cc57c695ab315e3cfb
|
|
| BLAKE2b-256 |
89e50c857de429f4c75ace487bcf9719a5ffcf7562c4e828d6a88f5e1701721b
|
File details
Details for the file llama_index_embeddings_autoembeddings-0.2.1-py3-none-any.whl.
File metadata
- Download URL: llama_index_embeddings_autoembeddings-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
124357bedacd29fcbd7179da87362e3e31170d2ef1f583824a88964bb8ca3bd4
|
|
| MD5 |
696ab85a94dfbf803f6273e446722597
|
|
| BLAKE2b-256 |
3dac2a6c0a767ca061f147c51eaaa052e0be65fd51124e9ebec16f67ed3da087
|