Skip to main content

Live verification of AI model signatures to detect model changes

Project description

stampr_ai

Stampr AI Logo

PyPI version Python versions License: MIT

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stampr_ai-0.1.0a11.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stampr_ai-0.1.0a11-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

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

Hashes for stampr_ai-0.1.0a11.tar.gz
Algorithm Hash digest
SHA256 5db08e6c3cfb72c3c950a450f1c0d96a853e3c5fe7ac0381484d102ca9c36817
MD5 c0bb075a0480c6044ef0dd1e19c70b21
BLAKE2b-256 fd5e27d26fc5f83013bbce6d313f5e205a3a99d0548d76fdf54170e7190503f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for stampr_ai-0.1.0a11.tar.gz:

Publisher: deploy.yml on stampr-ai/stampr_ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for stampr_ai-0.1.0a11-py3-none-any.whl
Algorithm Hash digest
SHA256 72c8b9bd8d5d1735b6fca21d01e487d858fb81b42dba52c042848e59af28e325
MD5 2270ca551ff921b87177ac7bbccfab86
BLAKE2b-256 75a45c62b01eaf3f9d33630591134454ac278d5e1b3400d536174da32b01742d

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page