
Holistic AI
The Holistic AI SDK is a library that provides integration with the HAI Platform
- Holistic Ai website: https://holisticai.com
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)
| File | Size | Uploaded | |
|---|---|---|---|
| haisdk-0.0.18.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|