Skip to main content


Holistic AI

The Holistic AI SDK is a library that provides integration with the HAI Platform

Installation

Install the library with:

    pip install haisdk

How to use the haisdk for Quantitative Assessment

Create a config

    from haisdk.config import Config
    config = {
        'tenant_id': '',
        'api_key': '',
        'project_id': '',
        'solution_id': '',
        'instance_id': ''
    }
    session = Config(config=config)

Create an assessment

    from haisdk.assessment import Assess
    settings = {
        'task': '',
        'tbd': 'tbd'
    }
    assess = Assess(session=session, settings=settings)
    assess.run(input=...,output=...,pred=...,model=...)

How to use the haisdk for Safeguard Monitoring

Create a config

    from haisdk.safeguard.safeguard_processor import SafeguardProcessor

    config = {
        "tenant_id": "",
        "apikey": "",
        "api_name": "",
        "provider_name: ""
    }
    safeguard = SafeguardProcessor(config)

Prepare your data

data = {
    "sender_id": "",
    "data": {
        "message_groups": [
            {
                "prompt": {
                    "message": "",
                    "sender_type": "human",
                },
                "response": {
                    "message": "",
                    "sender_type": "provider",
                },
            },
        ]
    }
}

Analyse your data (either sync or async)

# sync operation
results = safeguard.analyse(test_data)
print(results)

# async operation
safeguard.analyse_async(test_data)

Metadata

Release files for haisdk 0.0.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for haisdk 0.0.18
File Size Uploaded
haisdk-0.0.18.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for haisdk 0.0.18
File Interpreter ABI Platform
haisdk-0.0.18-py3-none-any.whl Python 3 none any Details

Total release size: 13.4 kB

Release files / haisdk-0.0.18.tar.gz

Download URL haisdk-0.0.18.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a62374c949641fcd1212886a549dc9193f9284c69867dc10228609d49f8f6961
BLAKE2b-256 checksum
How to use checksums
2168c7be74d3e0803d8803e77ace120a7000df4b84607d36a8309d242217901c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.9.20 Linux/6.5.0-1025-azure

Release files / haisdk-0.0.18-py3-none-any.whl

Download URL haisdk-0.0.18-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cecc01634e2448a7855a33bbf15afd3793f1f05d7ab2d8ce47c624d55342aef
BLAKE2b-256 checksum
How to use checksums
e4b60c655ca664a4a08e717420b48062317d064aac6d5fa1e6010ce61b50e081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.9.20 Linux/6.5.0-1025-azure

Release history Release notifications | RSS feed

This release

0.0.18 This release

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page