A python package of utilities for AI based solutions
Project description
ObzerveAI
ObzerveAI is a middleware for your AI applications and models. It provides a simple interface for redacting sensitive information from your prompts. It also helps you to monitor and visualize the usage metrics.
Features
- Redaction of sensitive information from your prompts.
- Monitoring of function usage with metrics recorded in InfluxDB.
- Visualization of the metrcs using grafana
Installation
Setup InfluxDB and Grafana
Using docker compose you can setup influxdb and grafana with default configurations and sample dashboard. After cloning the repo, run the following command
docker-compose up -d
This will setup a grafana at http://localhost:3000 and influxdb on http://localhost:8086
Python Package
To install the package run following command
pip install obzerveai
Usage
To use ObzerveAI, you need to create an instance of the ObzerveAI class and then call the redact_sensitive_info method with the text you want to sanitize.
from obzerve_ai import ObzerveAI
# Initialize the ObzerveAI instance with default or custom parameters
obzerve_ai = ObzerveAI()
# Redact sensitive information from text
sensitive_text = "Contact me at example@example.com or call me at 123-456-7890."
redacted_text = obzerve_ai.redact_sensitive_info(sensitive_text)
print(redacted_text)
Dashboard
A pre-created dashboard will be available. You can access it at http://localhost:3000/dashboards
Advanced Configuration
You can choose to change the influxdB configurations with the following parameters while initiating the ObzerveAI class:
obzerve_ai = ObzerveAI(token="your_influxdb_token", org="your_org", bucket="your_bucket", url="your_influxdb_url")
token
: InfluxDB authentication token (default: "my_default_token_value").org
: InfluxDB organization name (default: "obzerve_ai").bucket
: InfluxDB bucket name where usage data will be stored (default: "usage").url
: URL of the InfluxDB instance (default: "http://localhost:8086").
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
Built Distribution
Hashes for obzerveai-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 335792621fa21f75b9be659938f935223f24f59f9504e0a574cb5715478670e8 |
|
MD5 | 053f6d6990595b698416a9652d33b2de |
|
BLAKE2b-256 | cfede2dc99c7a9e40528b51d60b510c7e1a180da0d72431128439bfd59a2f7f6 |