Skip to main content

llama-index embeddings baseten integration

Project description

LlamaIndex Embeddings Integration: Baseten

This integration allows you to use Baseten's hosted models with LlamaIndex.

Installation

Install the required packages:

pip install llama-index-embeddings-baseten
pip install llama-index

Baseten embeddings are offered through dedicated deployments. You need to deploy your preferred embeddings model in your Baseten dashboard and provide the 8 character model id like abcd1234.

Usage

from llama_index.embeddings.baseten import BasetenEmbedding

# Using dedicated endpoint
# You can find the model_id by in the Baseten dashboard here: https://app.baseten.co/overview
embed_model = BasetenEmbedding(
    model_id="MODEL_ID",
    api_key="YOUR_API_KEY",
)

# Single embedding
embedding = embed_model.get_text_embedding("Hello, world!")

# Batch embeddings
embeddings = embed_model.get_text_embedding_batch(
    ["Hello, world!", "Goodbye, world!"]
)

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_baseten-0.1.2.tar.gz (4.3 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_baseten-0.1.2.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_baseten-0.1.2.tar.gz
Algorithm Hash digest
SHA256 af61526176f7ab84d3d15f5831b6e8534f75c5961e61cbe87e8cbf0abc195e49
MD5 a55e1ba732166cbc00ff5a7dbece2d9f
BLAKE2b-256 6d2bd36fc9ee2e9534b624a6169d2346a770931a722faca7d978b1b8a2859c52

See more details on using hashes here.

File details

Details for the file llama_index_embeddings_baseten-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_embeddings_baseten-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 582ccb060b03b228c9c58e55730ffe3ccb6b8b39d4524d7f9907fd1f22608558
MD5 57b2c92feeb69d986e88e82e8dd730ab
BLAKE2b-256 808baac1100458252b5b70c7ceb79733a112fdbbfb808895455d3117603ff01a

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