Skip to main content

Python SDK for evaluating AI voice bot calls via Prodloop APIs.

Project description

Prodloop Observability SDK

Python SDK to evaluate AI voice bot calls through the Prodloop evaluation service.

Install

pip install prodloop-observability-sdk

Quickstart

from prodloop import ProdloopClient, EvaluationParameter

client = ProdloopClient(api_key="sk_live_...")

result = client.evaluate_call(
    audio_file_path="call.mp3",
    parameters=[
        EvaluationParameter.E2E_RESPONSE_TIME,
        EvaluationParameter.HALLUCINATION,
    ],
    thresholds={"e2e_response_time_max_ms": 800},
)

print(result)

Extraction Validation

To validate extraction quality, pass both extraction_schema and bot_captured_variables:

result = client.evaluate_call(
    audio_file_path="call.mp3",
    parameters=[EvaluationParameter.EXTRACTION_VARIABLES],
    extraction_schema={"customer_name": "string"},
    bot_captured_variables={"customer_name": "ram"},
)

Response includes:

  • extraction_variables
  • extraction_validation

Supported Parameters

  • e2e_response_time
  • turn_by_turn_latency
  • hallucination
  • extraction_variables
  • interruption_behavior

Authentication

Pass your Prodloop API key in the SDK constructor.
The SDK sends it as a Bearer token in the Authorization header.

Errors

  • ValidationError: invalid local inputs (file path, parameters, etc.)
  • APIError: backend/API-level failures (status_code, message)

Local Demo

Use the included demo script:

export PRODLOOP_API_KEY="sk_live_..."
python demo/use_sdk.py --audio-file "/absolute/path/to/call.mp3"

Documentation Site

This repo includes MkDocs docs under docs/.

pip install -e ".[docs]"
mkdocs serve

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

prodloop_observability_sdk-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

prodloop_observability_sdk-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file prodloop_observability_sdk-0.1.0.tar.gz.

File metadata

File hashes

Hashes for prodloop_observability_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb09d8cb5bbdbe74587cce37fb0f85485c0b6bba83dd0e3514a596864e4b4490
MD5 9a146f26cf292552643b235d7c66af93
BLAKE2b-256 807d628321128b7d9769399d893f8811e7262bc1a887da69292c394506008d7a

See more details on using hashes here.

File details

Details for the file prodloop_observability_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prodloop_observability_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89df24d25d22864eef5aeb900cd49347cfe957baf022ee01336817d6d9520c63
MD5 12d76d4236e77ad1c753489b0e55575a
BLAKE2b-256 877e5e2fbb5c0dadb37e6e87cf6f30afc8ae202ec7943ec981227705c8a9869a

See more details on using hashes here.

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