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.1.tar.gz (4.7 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.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.5.1.tar.gz
Algorithm Hash digest
SHA256 bc47424900ad7c6d6e23682376bd7be4218cb8e4ebc18a8454712205043bd011
MD5 656817570436a30d5f0255581270879a
BLAKE2b-256 4d3312808d79cefee90dbab07a23cbb22d66ecadd6044c473dfad3d150830c8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e7b18cc1b0f7846266061de114b3d3db49df011d208c7101a476f53da74bd50
MD5 5a1bd0eacb9dc9dba46e3fbf7dd65762
BLAKE2b-256 6e6d8445a9a1591a2f8cb385167c60b6adcb964f2fe7b7e9e27eefbba6de1ef1

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