Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_llms_cleanlab-0.5.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_llms_cleanlab-0.5.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_llms_cleanlab-0.5.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5d7ad510ae8f820592a618a0ea93ebf10a5ac6f586e8df1d9e67992740ca8cb6
MD5 e6547a95324f0265648c10377eb8216c
BLAKE2b-256 1e93be6168244d79f8bac22b43d817cb33256974849677863667a36e696ad71c

See more details on using hashes here.

File details

Details for the file llama_index_llms_cleanlab-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef12e04222b6bc0e2983d5e59fa5998c96c88b3e26f57cd7d281bd8ba721a357
MD5 934ea70b415b4dcab9a42c457c35bfd6
BLAKE2b-256 f40aee79baa39de110b02329a3236fedf2457534de631f8929f9478717b64262

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page