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.0a10.tar.gz (26.0 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.0a10-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file stampr_ai-0.1.0a10.tar.gz.

File metadata

  • Download URL: stampr_ai-0.1.0a10.tar.gz
  • Upload date:
  • Size: 26.0 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.0a10.tar.gz
Algorithm Hash digest
SHA256 db494cd0169913a5a1a6199f2319663be558343309e086abdf7893ec3544c274
MD5 93d88a8e2c4bc0586045b55e0485374a
BLAKE2b-256 63bf799b2a63ad511d2e4349631981385b0e29d9604bc25e12848b24c07bd8e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for stampr_ai-0.1.0a10.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.0a10-py3-none-any.whl.

File metadata

  • Download URL: stampr_ai-0.1.0a10-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.0a10-py3-none-any.whl
Algorithm Hash digest
SHA256 8c103713cdee4c298c349e36c7a9355aef60cd1cf2ba7b6cc030653bac476080
MD5 6c6ac8dc6436514bb22d7e18a8b9b2d9
BLAKE2b-256 409b3ced30cc58d9aa9673cc85d55bbf948b8280e258a65dc2b2b3eda944636b

See more details on using hashes here.

Provenance

The following attestation bundles were made for stampr_ai-0.1.0a10-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