llama-index-embeddings-google-genai

llama-index embeddings google genai integration

10 个版本 Python <4.0,>=3.10
安装
pip install llama-index-embeddings-google-genai
poetry add llama-index-embeddings-google-genai
pipenv install llama-index-embeddings-google-genai
conda install llama-index-embeddings-google-genai
描述

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="gemini-embedding-2-preview")

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

Vertex AI

embed_model = GoogleGenAIEmbedding(
    model_name="gemini-embedding-2-preview",
    vertexai_config={
        "project": "your-project-id",
        "location": "your-location",
    },
)
版本列表
0.5.1 2026-05-19
0.5.0 2026-03-12
0.4.0 2026-03-10
0.3.2 2026-01-22
0.3.1 2025-09-08
0.3.0 2025-07-30
0.2.1 2025-07-02
0.2.0 2025-05-26
0.1.1 2025-05-25
0.1.0 2025-03-10