llama-index llms cleanlab integration
Project description
LlamaIndex Llms Integration: Cleanlab
Overview
Integrate with Cleanlab's Trustworthy Language Model (TLM) APIs.
Installation
pip install llama-index-llms-cleanlab
Example
With environmental variables.
CLEANLAB_API_KEY=your_api_key
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
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_llms_cleanlab-0.7.0.tar.gz.
File metadata
- Download URL: llama_index_llms_cleanlab-0.7.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d464851b0371c59975f376dcde5a3b64b260983fb6a0bfad3f97a37ff472af80
|
|
| MD5 |
26e0d81b7749ef3b9dc55fe0a5f34a6e
|
|
| BLAKE2b-256 |
6518b1022813ca747a365b1552b507ae7d6e1218bbbfdc2dd32a2c4a27a016e4
|
File details
Details for the file llama_index_llms_cleanlab-0.7.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_llms_cleanlab-0.7.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3102583011bc2102e40814f2cfc8baa9ea6b409a1997a119334a07eb916c085
|
|
| MD5 |
b925fe0653d6d1e3fb2d7c0adda44006
|
|
| BLAKE2b-256 |
d4d730509ea537748d4533e5c3a2397583b9346b594fae875089fb05cb4b6ba8
|