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

File metadata

File hashes

Hashes for llama_index_embeddings_baseten-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5bef502fffbf78b4aa300f5ca4393aa61a4e52e279b062bc21ac5eeb7ee3916a
MD5 e871ab78417c49f5089567345cce454b
BLAKE2b-256 3678b134b1f6ed58a40224edf5535388c1cde13692d33445887e50aea9a95719

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_baseten-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2212216cd2cdbb7237395b9568b86750ce1eecdb0df789476c88f63b5c513f65
MD5 3d8d89a09e4d6ded8c3f56c47e58849e
BLAKE2b-256 56a2408ca91c4172c029aa9a3df40bea23388a0e2907c3b20f0ffc6a3012e22b

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