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},
    input_prompt="Bot instructions used during this call...",
)

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

Hallucination Input Requirement

When requesting hallucination, pass the bot's original call prompt as input_prompt:

result = client.evaluate_call(
    audio_file_path="call.mp3",
    parameters=[EvaluationParameter.HALLUCINATION],
    input_prompt="You are a polite admissions bot. Never invent course details.",
)

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)

Documentation Site

Live documentation: https://observability-sdk-docs.pages.dev/

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.4.tar.gz (4.2 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.4-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for prodloop_observability_sdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 635e1a69346ec93666ce2cc8b92ef8170a03567680d8bc5063f6ad20950338b2
MD5 82809b2a80c24168649c11fec68453c1
BLAKE2b-256 21065ebe1c977d3e2496b2ada570ca81c09603474d8bc459b469fcc1df2ae0cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prodloop_observability_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e1ebdccfc510c555a7f6a1f43bf8df508396ece0f42f99fdbe6409bbe8077837
MD5 5a4f61e0a4243323d902d12bbd94e134
BLAKE2b-256 f9db5986ef78e3cb5fdc5d39541822aa6884c954b3a0d2268c9b4ed889debe38

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