Skip to content

Getting Started

Prerequisites

  • Python 3.9+
  • valid Prodloop API key
  • local audio file (.mp3, .wav, .webm, etc.)

Install

pip install prodloop-observability-sdk

First Request

from prodloop import ProdloopClient, EvaluationParameter

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

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

print(response)

For extraction validation use:

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