šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

llama-index-embeddings-google-genai

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

llama-index-embeddings-google-genai

llama-index embeddings google genai integration

0.1.0
PyPI
Maintainers
1

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",
    },
)

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts