Metadata-Version: 2.4
Name: llama-index-embeddings-baseten
Version: 0.1.0
Summary: llama-index embeddings baseten integration
Author: alexker
License-Expression: MIT
License-File: LICENSE
Requires-Python: <4.0,>=3.9
Requires-Dist: llama-index-core<0.14,>=0.13.0
Requires-Dist: llama-index-llms-openai<0.6,>=0.5.0
Description-Content-Type: text/markdown

# LlamaIndex Embeddings Integration: Baseten

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

## Installation

Install the required packages:

```bash
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

```python
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!"]
)
```
