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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad3fa59318872a64af08537f21225f22524b611bb39a19e7d982e7a7ac55fd68 |
|
MD5 | 72e0fc21f9a28d09d29f77e4325e2f7d |
|
BLAKE2b-256 | 03c4d4951b6c583ad95398fbcd0c0f9e11b8753a15bfad878d86d480d4e5d089 |
Close
Hashes for llama_index_llms_cleanlab-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40856f3cb7303b265a2c7021c5602c1d6071bd808338dd9230a02549953b0d7d |
|
MD5 | acef459581c501245970c264f98f1114 |
|
BLAKE2b-256 | afe66a2ac24de8c98d264156d387d7584671c487a9d4bbb969710e29ed495942 |