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.4.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: llama_index_llms_cleanlab-0.4.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0

File hashes

Hashes for llama_index_llms_cleanlab-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3914e0c93b50bf7dcb31f53798c19f34ff1e2b50355c778e936c293a32719414
MD5 751ce661e17138fb918e1390e85cc14a
BLAKE2b-256 ff9fad2496916acf9d84268f853976de7328b12bb2addee9ebc8dfb6a4e36047

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ab03dcdfa0bba32d9b05882a6fae4783b25b0b480f2594ea56bcbae5d395fe4
MD5 1c7b9808772c12b0848d1d72a3b77d27
BLAKE2b-256 27ba5b37f93fe9e28d4d5570fe981aa4554c930fc94f1efbdd227b122bfdd4bf

See more details on using hashes here.

Supported by

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