Skip to main content

llama-index embeddings huggingface api integration

Project description

LlamaIndex Embeddings Integration: Huggingface API

Integration with Hugging Face's Inference API for embeddings.

For more information on Hugging Face's Inference API, visit Hugging Face's Inference API documentation.

Installation

pip install llama-index-embeddings-huggingface-api

Usage

from llama_index.embeddings.huggingface_api import (
    HuggingFaceInferenceAPIEmbedding,
)

my_embed = HuggingFaceInferenceAPIEmbedding(
    model_name="BAAI/bge-small-en-v1.5",
    token="<your-token>",  # Optional
)

embeddings = my_embed.get_text_embedding("Why sky is blue")

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

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page