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.3.0.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.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_google_genai-0.3.0.tar.gz
Algorithm Hash digest
SHA256 44eb1251a96228bbc18f69f27f096829176cb2230f985defb59060caf6af790d
MD5 3c77d0f2fa19c8e002f51929ed3d4f91
BLAKE2b-256 44e8d50734396ca2a9f826ed57421e05c8655c72ee10e14b757422284a8e6a6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_google_genai-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f45953c24b796dc27ecf4dfe337b769534269fecf8ea58b2a4bdab096dac246f
MD5 3752b9ce2f2b0a5a0e9bd872a7ead169
BLAKE2b-256 9c7d68487c579eee4b6bd4cfe9d560b89d9f0bdcc7913b5e757275d209d85e8e

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