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

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: llama_index_llms_cleanlab-0.1.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for llama_index_llms_cleanlab-0.1.2.tar.gz
Algorithm Hash digest
SHA256 006a23c4890ec150b1f15aa756397ab093bdfc7102ad17ff7f05bf8ec5ac5e78
MD5 399740c0c04543ed787160f59ec2a508
BLAKE2b-256 774b9d8e0892b8d1987ebe3de209792591025c71508e57d838ac525b6e736f30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 194621d5a7aa4e857fc3b492df1855648545453701791bc751dba9f1b63a2f0f
MD5 c57715a63b3c4c30e99346d0c2108ad1
BLAKE2b-256 715f099e440e0b2a22b43a424c12c85557506a2eee3ee3afe4aec9dda1a8cff3

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