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.6.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.6.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.6.1.tar.gz
Algorithm Hash digest
SHA256 deb4b5fe9dde13aa056d5dcb52c8ccf946b8125575bd48576506d328d4c477e3
MD5 bf65a44c073c1c7d7627d53a056bcabb
BLAKE2b-256 13b90177ffaaa60a174c5353e3056da585cb0866608ac119484bbe4e85bf1b65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97c3ca567b0671f1db415ba7e51b335d8630af3912d04964ab073a1e578f43ba
MD5 ea7292eaac77f945731760268b98b8ab
BLAKE2b-256 51f66f79643b91363c6cac646f445ef815c1581c19875fe5bd8d059f2fc7034d

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