BivectorAI Python SDK
Enterprise AI safety verification for production systems.
Install
pip install bivectorai
Quick Start
from bivectorai import BivectorAI
client = BivectorAI(api_key="your-api-key")
# Scan AI output for safety issues
result = client.verify_output(
text="The model says X",
sources=["User asked Y"],
)
print(result.verdict) # PASS, REVIEW, or BLOCK
# Detect LLM injection
scan = client.scan_injection("Ignore previous instructions and...")
print(scan["verdict"]) # BLOCK or PASS
# Check for hallucinations
check = client.check_hallucination(
claim="Revenue was $10B in 2023",
evidence=[{"source": "annual_report.pdf", "text": "Revenue: $8.2B"}],
)
print(check["verdict"]) # GROUNDED or UNSUPPORTED
API Reference
verify_output(text, sources)— LLM output safety gatescan_injection(text)— prompt injection detectioncheck_hallucination(claim, evidence)— factual grounding checkdetect_pii(text)— PII detection and classificationscan_content(text, categories)— comprehensive content safetyverify_workflow(steps)— AI workflow verificationget_usage_summary(period)— usage statisticsrevoke_api_key(key_prefix)— key rotation helper
Full docs: https://bivectorai.com/docs/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bivectorai-0.3.0.tar.gz
(14.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bivectorai-0.3.0.tar.gz.
File metadata
- Download URL: bivectorai-0.3.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3ce14776bcf452a8d26ce14878b555c2b38cc8f71f9b63c14ce3ae29121eda1
|
|
| MD5 |
2092b7b7fb09aba567cd67c3921cef0d
|
|
| BLAKE2b-256 |
82e9592f00a0401ef28cb03b7d4c6379b7cd26a195043160da08fcf580bda123
|
File details
Details for the file bivectorai-0.3.0-py3-none-any.whl.
File metadata
- Download URL: bivectorai-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2de79ad0ec9bf4437489dd867a7edec1542dc26f125061b533c6407c68c9468
|
|
| MD5 |
f46375a73993b497dd07f59024ffc700
|
|
| BLAKE2b-256 |
39ea25294dc89d7f955915b6db909af9fff43269768a7bc922c42d2d7ce6d46c
|