llama-index embeddings vertex integration
Project description
LlamaIndex Embeddings Integration: Vertex
Implements Vertex AI Embeddings Models:
| Model | Release Date |
|---|---|
| textembedding-gecko@003 | December 12, 2023 |
| textembedding-gecko@002 | November 2, 2023 |
| textembedding-gecko-multilingual@001 | November 2, 2023 |
| textembedding-gecko@001 | June 7, 2023 |
| multimodalembedding |
Note: Currently Vertex AI does not support async on multimodalembedding.
Otherwise, VertexTextEmbedding supports async interface.
New Features
-
Flexible Credential Handling:
- Credential Management: Supports both direct credentials and service account info for secure API access.
-
Model Name Handling in Embedding Requests:
- The
_get_embedding_requestfunction now accepts themodel_nameparameter, allowing it to manage models that do not support thetask_typeparameter, liketextembedding-gecko@001.
- The
Example Usage
from google.oauth2 import service_account
from llama_index.embeddings.vertex import VertexTextEmbedding
credentials = service_account.Credentials.from_service_account_file(
"path/to/your/service-account.json"
)
embedding = VertexTextEmbedding(
model_name="textembedding-gecko@003",
project="your-project-id",
location="your-region",
credentials=credentials,
)
Alternatively, you can directly pass the required service account parameters:
from llama_index.embeddings.vertex import VertexTextEmbedding
embedding = VertexTextEmbedding(
model_name="textembedding-gecko@003",
project="your-project-id",
location="your-region",
client_email="your-service-account-email",
token_uri="your-token-uri",
private_key_id="your-private-key-id",
private_key="your-private-key",
)
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_vertex-0.4.0.tar.gz.
File metadata
- Download URL: llama_index_embeddings_vertex-0.4.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e7f41bc9e6307b95aabc7dba21537581345806e55098bc0e7b897c7eb83e6ec
|
|
| MD5 |
27f433e96702ff4efc300e0a6cc084bc
|
|
| BLAKE2b-256 |
7bdf3dbcf17f8b53954bbbf8d97b2910bca35c77e9922c11c28f6b669e0a0e68
|
File details
Details for the file llama_index_embeddings_vertex-0.4.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_embeddings_vertex-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97f33cb84927ab718c822a8953cee999f27082fd764b5e4f160d324daea117be
|
|
| MD5 |
5c38458f607544457d259a4352a6acfa
|
|
| BLAKE2b-256 |
98a4ed32059e80a00b2780a78cc013874de9a92f001a29cf090c39d8ffdcbc8d
|