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

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: llama_index_llms_cleanlab-0.2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0

File hashes

Hashes for llama_index_llms_cleanlab-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3f3edeef4d361e62bd6e70fc476d10a3ef72830b863000c2e0fe9a6f8d562b9e
MD5 c4c922d39c0e8408d63b340505f79225
BLAKE2b-256 3efaffc46f56f842b328290972b89699d4b4e0a2ee5d19a316a5781bb1df6f22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9e3aceba145f4a4a8113895afd2c88374e2abe0e5ef0932775d69dc1f5b6009
MD5 6736ab4486de74a541044091f8dd5515
BLAKE2b-256 97717a1ae8e5f3ed6d346868388d4b89b528146784353ef2cd66e2aa58a021c6

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