Holistic AI SDK Library
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
haisdk-0.0.18.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file haisdk-0.0.18.tar.gz
.
File metadata
- Download URL: haisdk-0.0.18.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.9.20 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a62374c949641fcd1212886a549dc9193f9284c69867dc10228609d49f8f6961 |
|
MD5 | de8a5fb17d84d720e76fd3d0c6b9c47e |
|
BLAKE2b-256 | 2168c7be74d3e0803d8803e77ace120a7000df4b84607d36a8309d242217901c |
File details
Details for the file haisdk-0.0.18-py3-none-any.whl
.
File metadata
- Download URL: haisdk-0.0.18-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.9.20 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cecc01634e2448a7855a33bbf15afd3793f1f05d7ab2d8ce47c624d55342aef |
|
MD5 | ba3b2a9e4a0072f4f6aa0c908b9447ca |
|
BLAKE2b-256 | e4b60c655ca664a4a08e717420b48062317d064aac6d5fa1e6010ce61b50e081 |