llama-index-embeddings-google-genai 0.3.1


pip install llama-index-embeddings-google-genai

  Latest version

Released: Sep 08, 2025

Project Links

Meta
Author: Your Name
Requires Python: <4.0,>=3.9

Classifiers

Google GenAI Embeddings

This package provides a wrapper around the Google GenAI API, allowing you to use Gemini and Vertex AI embeddings in your projects.

Installation

pip install llama-index-embeddings-google-genai

Usage

from llama_index.embeddings.google_genai import GoogleGenAIEmbedding

embed_model = GoogleGenAIEmbedding(model_name="text-embedding-004")

embeddings = embed_model.get_text_embedding("Hello, world!")
print(embeddings)

Vertex AI

embed_model = GoogleGenAIEmbedding(
    model_name="text-embedding-004",
    vertexai_config={
        "project": "your-project-id",
        "location": "your-location",
    },
)
Extras: None
Dependencies:
google-genai (<2,>=1.24.0)
llama-index-core (<0.15,>=0.13.0)