Skip to main content

A plug-and-play SDK for de-hallucinating outputs from LLMs

Project description

Overview

HAPI is a plug-and-play SDK to dehallucinate your LLM generation in real time

  • Hallucination Detection: Identifies and flags AI-generated misinformation.
  • Confidence Filtering: Evaluates reliability of generated content.
  • Easy Integration: Will support any open-source model soon

Supported models - more coming soon!

  • Llama-2-7b-chat (meta-llama/Llama-2-7b-chat)
  • Falcon40b (tiiuae/falcon-40b)
  • Llama-2-7b (meta-llama/Llama-2-7b-hf)
  • MPT7B (mosaicml/mpt-7b)

Installation

pip install HAPI_SDK

Quick Start

from hapi_sdk import DeHallucinationClient

client = DeHallucinationClient(model_id="meta-llama/Llama-2-7b-chat-hf", license_key="your-license-key")

prompt = "Explain quantum entanglement in simple terms."

output, flagged_sentences = client.dehallucinate1(prompt)

print("Filtered Output:", output)

print("Flagged Sentences:", flagged_sentences)

Contact with any suggestions!

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

hapi_sdk-0.1.5.tar.gz (16.0 MB view details)

Uploaded Source

Built Distribution

hapi_sdk-0.1.5-py3-none-any.whl (67.1 kB view details)

Uploaded Python 3

File details

Details for the file hapi_sdk-0.1.5.tar.gz.

File metadata

  • Download URL: hapi_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 16.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for hapi_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 91145c801a1ab62af2c6b75bf10da4357bc8dce36ed6055bc7b512aac9981fdd
MD5 3ee0970ada5edde3438e4113cbcfa82c
BLAKE2b-256 3e3cd8cf131b7feb468c9c0d657d8cda6c66ec288b4c120751aab02bbe422f0b

See more details on using hashes here.

File details

Details for the file hapi_sdk-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: hapi_sdk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 67.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for hapi_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a1fd499fb9c0640f528efaedc8064d79cb39d69aab05ebc0c85d869b33004e64
MD5 691629845a4c3f11aed37cf16b54605e
BLAKE2b-256 0cf4dc965bd617e77b648d44108dcfaae07b0712b15dd5bc260c7518acf52746

See more details on using hashes here.

Supported by

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