Holistic AI SDK Library
Project description
![](https://pypi-camo.freetls.fastly.net/986738c58a3378933cc800ea2021d28808b6fabc/646f63732f686f6c69737469635f61692e706e67)
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.17.tar.gz
(5.6 kB
view hashes)