Files
pipecat/examples/batch-dialout-chatbot/analyze_logs.py
James Hush 8fb75cf6a7 test: batch dialout demo
Rename

Save changes

Batches of 50

No sort

Only write dialout false

Add rate limit handling

Save

Improvements

Save progress with recording

Fixed stop

Add backoff

Save logs

Make table nicer

Move to new folder
2024-12-19 14:40:47 +08:00

22 lines
711 B
Python

import json
with open("logs.json", "r") as file:
logs = json.load(file)
# Find IDs with duration less than 245 seconds
ids_with_short_duration = [
[entry["id"], entry["mtgSessionId"], entry["duration"]]
for entry in logs["data"]
if entry["duration"] < 245
]
print("\n=== Entries with Duration < 245 seconds ===")
print(f"Total entries found: {len(ids_with_short_duration)} / 144")
print("-" * 100)
print(f"{'Recording ID':36} | {'Session ID':36} | {'Duration':10}")
print("-" * 100)
for rec_id, session_id, duration in ids_with_short_duration:
print(f"{rec_id:20} | {session_id:20} | {duration:8} seconds")
print("-" * 100 + "\n")