Metadata-Version: 2.1
Name: llama-index-llms-cleanlab
Version: 0.2.0
Summary: llama-index llms cleanlab integration
License: MIT
Author: Ashish Sardana
Author-email: ashishsardana21@gmail.com
Requires-Python: >=3.8.1,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: cleanlab-studio (>=2.0.0,<3.0.0)
Requires-Dist: llama-index-core (>=0.11.0,<0.12.0)
Description-Content-Type: text/markdown

# LlamaIndex Llms Integration: Cleanlab

## Overview

Integrate with Cleanlab's Trustworthy Language Model (TLM) APIs.

## Installation

```bash
pip install llama-index-llms-cleanlab
```

## Example

With environmental variables.

```.env
CLEANLAB_API_KEY=your_api_key
```

```python
from llama_index.llms.cleanlab import CleanlabTLM

# Initialize Cleanlab's TLM without explicitly passing the API key and base
llm = CleanlabTLM()

# Make a query to the LLM
response = llm.complete("Explain the importance of open source LLMs")

print(response)
```

Without environmental variables

```python
from llama_index.llms.cleanlab import CleanlabTLM

# Set up the CleanlabTLM's class with the required API key and quality preset
llm = CleanlabTLM(
    quality_preset="best",  # supported quality presets are: 'best','high','medium','low','base'
    api_key="your_api_key",
)

# Call the complete method with a query
response = llm.complete("Explain the importance of open source LLMs")

print(response)
```

