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

File metadata

File hashes

Hashes for llama_index_embeddings_baseten-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8f612fb729c7ad8ea27a6a69da241d7ff1c19880cc547e0b3e8ca079cadb6349
MD5 61a7175d6077d3bd70189b4b4b5cb1a9
BLAKE2b-256 9e3b449a40612e4f014cc67bc96a85a5bcdd20bdfc1b28eca3318a4958dbc078

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_baseten-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f4f0ab5d03b3508ffac0ac78a9b4b67307558a394519dc83bf7e27c25630c053
MD5 654fd4d860c083832a41ae3bdd469827
BLAKE2b-256 f21ddb8817bb5e7258775737682772153e408567d7408c811b01684dc3d587d2

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