Skip to main content

llama-index embeddings google genai integration

Project description

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

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_google_genai-0.2.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file llama_index_embeddings_google_genai-0.2.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_google_genai-0.2.1.tar.gz
Algorithm Hash digest
SHA256 be1eaf71166acd91ae526d27b46ebd66cd16ba34620a4b9721d566df6742f8db
MD5 ae6975c49f31684779aade60bd3b7f87
BLAKE2b-256 7ada9a5ef2856b79f5010707921885aa51352dc0156e11d03cdfa553f166368b

See more details on using hashes here.

File details

Details for the file llama_index_embeddings_google_genai-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_embeddings_google_genai-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aee3e7f91684cb1e4df3b53f659ab1c6a60591d46ad95643a9fd88158472470b
MD5 70ee46031db74cfebf13eb7aa9fa5258
BLAKE2b-256 0962942c8ee760c0337473e48f3b1fe1c735abe51453ddc344ccbf3d1d36a87d

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