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",
)
Metadata
Release files for llama-index-embeddings-vertex 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llama_index_embeddings_vertex-0.6.0.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_index_embeddings_vertex-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / llama_index_embeddings_vertex-0.6.0.tar.gz
| Download URL | llama_index_embeddings_vertex-0.6.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e095def7a4af0a31757a2aab5f8fbdfa146dafbc961c83210100e9d0a6c10176
|
|
BLAKE2b-256 checksum How to use checksums |
89f095036a3d38848c0e621f465af6b5e501de4d73fda4059a90479adb2b050c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_embeddings_vertex-0.6.0-py3-none-any.whl
| Download URL | llama_index_embeddings_vertex-0.6.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63e4e3184151b51a9a2c5171d9cb0fb9df08acd8c223f3c818062b03fab2e302
|
|
BLAKE2b-256 checksum How to use checksums |
4bfd871d57eb23a9d77ee108e64d61a327e3c34b84235c19762a60b212922784
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|