Skip to main content

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_request function now accepts the model_name parameter, allowing it to manage models that do not support the task_type parameter, like textembedding-gecko@001.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_embeddings_vertex-0.5.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_embeddings_vertex-0.5.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_embeddings_vertex-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_embeddings_vertex-0.5.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}

File hashes

Hashes for llama_index_embeddings_vertex-0.5.0.tar.gz
Algorithm Hash digest
SHA256 168d9582e847b436178792ca2577c16f945a1fe4af4bfa24260e45080ee8a6bc
MD5 8706db38f6f6d2c9b410efa46172489f
BLAKE2b-256 c3ae495b9eb8e6cbdb4455335c9d08c298bb12dc680fe66a426d3865b0fd4eda

See more details on using hashes here.

File details

Details for the file llama_index_embeddings_vertex-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_embeddings_vertex-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}

File hashes

Hashes for llama_index_embeddings_vertex-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 563fff3581ee43185a0595a8d24f14eb5df8927318edec355bfacc621ea0385e
MD5 2afffbf361ae46c77193abf86c333cb9
BLAKE2b-256 8c125cb5584284181c87e1f8e6b9e81f3efd1781b66d5c886da46c602801d4c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page