Live verification of AI model signatures to detect model changes
Project description
stampr_ai
Live verification of AI model signatures to detect model changes and ensure consistent AI behaviour.
Installation
pip install stampr-ai
Setup
import os
os.environ['OPENAI_API_KEY'] = "your_openai_api_key_here"
os.environ['OPENROUTER_API_KEY'] = "your_openrouter_api_key_here"
os.environ['HF_TOKEN'] = "your_huggingface_token_here"
Quick Start
Install stampr_ai and run verification:
pip install stampr_ai
# CLI usage - most recent signature only
stampr gpt-4o:now OpenAI
# CLI usage - past 4 days (more robust)
stampr gpt-4o:latest OpenAI
# Or with explicit API key
stampr gpt-4o:latest OpenAI --api-key $OPENAI_API_KEY
Python Usage
OpenAI Example
from stampr_ai import verify_model
import os
# Verify model matches a specific signature hash
result = verify_model("gpt-4o:bede20", "OpenAI", os.environ['OPENAI_API_KEY'])
if result['verified']:
print("Signature Verified.")
else:
print("Signature mismatch!")
print(f"Expected: {result['live_verification_result']['expected_tokens']}")
print(f"Actual: {result['live_verification_result']['actual_tokens']}")
OpenRouter Example
from stampr_ai import verify_model
import os
# OpenRouter example - robust verification
result = verify_model("Llama4_17b:latest", "OpenRouter/Parasail", os.environ['OPENROUTER_API_KEY'])
if result['verified']:
print("Signature Verified.")
else:
print("Signature mismatch!")
print(f"Expected: {result['live_verification_result']['expected_tokens']}")
print(f"Actual: {result['live_verification_result']['actual_tokens']}")
License
MIT License - see LICENSE for details.
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
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 stampr_ai-0.1.0a11.tar.gz.
File metadata
- Download URL: stampr_ai-0.1.0a11.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db08e6c3cfb72c3c950a450f1c0d96a853e3c5fe7ac0381484d102ca9c36817
|
|
| MD5 |
c0bb075a0480c6044ef0dd1e19c70b21
|
|
| BLAKE2b-256 |
fd5e27d26fc5f83013bbce6d313f5e205a3a99d0548d76fdf54170e7190503f8
|
Provenance
The following attestation bundles were made for stampr_ai-0.1.0a11.tar.gz:
Publisher:
deploy.yml on stampr-ai/stampr_ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stampr_ai-0.1.0a11.tar.gz -
Subject digest:
5db08e6c3cfb72c3c950a450f1c0d96a853e3c5fe7ac0381484d102ca9c36817 - Sigstore transparency entry: 257106527
- Sigstore integration time:
-
Permalink:
stampr-ai/stampr_ai@73c03bc66aacf26de303cdac8d538f0f3fd42701 -
Branch / Tag:
refs/tags/release/0.1.0a11 - Owner: https://github.com/stampr-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@73c03bc66aacf26de303cdac8d538f0f3fd42701 -
Trigger Event:
push
-
Statement type:
File details
Details for the file stampr_ai-0.1.0a11-py3-none-any.whl.
File metadata
- Download URL: stampr_ai-0.1.0a11-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72c8b9bd8d5d1735b6fca21d01e487d858fb81b42dba52c042848e59af28e325
|
|
| MD5 |
2270ca551ff921b87177ac7bbccfab86
|
|
| BLAKE2b-256 |
75a45c62b01eaf3f9d33630591134454ac278d5e1b3400d536174da32b01742d
|
Provenance
The following attestation bundles were made for stampr_ai-0.1.0a11-py3-none-any.whl:
Publisher:
deploy.yml on stampr-ai/stampr_ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stampr_ai-0.1.0a11-py3-none-any.whl -
Subject digest:
72c8b9bd8d5d1735b6fca21d01e487d858fb81b42dba52c042848e59af28e325 - Sigstore transparency entry: 257106531
- Sigstore integration time:
-
Permalink:
stampr-ai/stampr_ai@73c03bc66aacf26de303cdac8d538f0f3fd42701 -
Branch / Tag:
refs/tags/release/0.1.0a11 - Owner: https://github.com/stampr-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@73c03bc66aacf26de303cdac8d538f0f3fd42701 -
Trigger Event:
push
-
Statement type: