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

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: llama_index_llms_cleanlab-0.3.0.tar.gz
  • Upload date:
  • Size: 3.5 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.3.0.tar.gz
Algorithm Hash digest
SHA256 3b44c04e4d566ed7b4b72772b6457f10f948fe6c962d8c412a4cc1ce5521d7a4
MD5 9a4d9b99ee604f1457243b011b26ec3f
BLAKE2b-256 3fcf7d270b516dcf97e539c19091a351dab671a37a3468e90c5791f470f79ab5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e512e981bf0640a49b858ccf73b4ec32a2388af37a7bfafaf459b2ce0f12e52
MD5 e1b87d63970940a4bbee19d99ffd93c5
BLAKE2b-256 48773fe5d49ae52e3503553129e2513d2347384190024ddc2f7e37d1357509dd

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