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
Close
Hashes for llama_index_llms_cleanlab-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | baf5067ff8312c94f73053fd72371bd1da447da3dc12ea37cedb8a57f2cc1595 |
|
MD5 | 8281ca765522c5a46d1cb71930c2fe60 |
|
BLAKE2b-256 | 0abb8708c2012027b581f779b82203c3c90b1e2acf7d002e123a22a3974ee6e0 |
Close
Hashes for llama_index_llms_cleanlab-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fa7f2319d18d69b589cf3e7e5898cd4e9b53cf74f4071f62a5ea167a89a5f41 |
|
MD5 | a5394116861576f9376b09e00cfe3138 |
|
BLAKE2b-256 | 9693844c054aa5a2fdf55fe7213378b14b39709b656baf7c8e61e34f1d1d271f |