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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.6.0.tar.gz
Algorithm Hash digest
SHA256 b206ad38d1f4d8d906dae105cf04311b665eae8e0ad7f2a8001f96bfc3b0abb3
MD5 3d6e07fb0b7f2c14f4ec6878e0e268b2
BLAKE2b-256 6f8f3c51d7350b1ed54c295a44c9194db87266ac3ed661c98e2c3fb5cf597679

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_llms_cleanlab-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a952eca007f9c84a3be33735f458f9f72a04142d4e8c1a8d995d63a66e5e9e2e
MD5 893072faf44efa0c372b3a7a1d92e380
BLAKE2b-256 7e158fc19606d10037cf4c25bbbd2a4b8f843439deb153ea28533d1335250369

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