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.7.tar.gz (15.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hapi_sdk-0.1.7-py3-none-any.whl (67.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hapi_sdk-0.1.7.tar.gz
Algorithm Hash digest
SHA256 84c5ccdeb9411ba24cf80d4c66c47b4ae6517ef2f032c6a361ead29b8e7cb8ad
MD5 048699c42cae3c90dcf43f17a4c2defc
BLAKE2b-256 6e3bc2963f5a4a6e292e65bcb879430bbcd446f312a3f34f64496d8c42cf9fc0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hapi_sdk-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7fd8ec1a73d55f3de1a183774c14380d36dcc6d4b95be9a409c6e53d1062dcaf
MD5 96fa4a50de96f6c38dee89383d1cf86d
BLAKE2b-256 7221462a0fd70a9b85c4e62bf3d88d698b54c623caac66faa411e53886602c1f

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