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

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_huggingface_api-0.4.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_huggingface_api-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6a58426bd9f930d51b6aa0a87c64d43a2810c7138a7fd206c395bcf4232ce2a8
MD5 c0b8541418d47aa96b448acd3d555a58
BLAKE2b-256 e99509dc411e1a2f39f0fa067aa312b7d744fab0ca1ede8b12bf16b0dfc61a76

See more details on using hashes here.

File details

Details for the file llama_index_embeddings_huggingface_api-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_embeddings_huggingface_api-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb00ef6279e276abb90fed5cf0ebcfce1c4d59229192a29fa09f9ff9bd072beb
MD5 52073f70c2cadf2babc79cd5b467cc31
BLAKE2b-256 ad5a8c0a5446b2e484c2507a466a167511f0f18c33b4049859f4c2f963e1a81e

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