Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Elevenlabs Elevenlabs python UnitTestSummaryResponseModel

From Leeroopedia
Attribute Value
Page Type Implementation
Package elevenlabs
Module elevenlabs.types.unit_test_summary_response_model
Class UnitTestSummaryResponseModel
Base Class UncheckedBaseModel
Source File src/elevenlabs/types/unit_test_summary_response_model.py
Auto-Generated Yes (Fern API Definition)

Overview

Description

UnitTestSummaryResponseModel is a Pydantic-based data model representing a summary view of a unit test. It provides lightweight metadata fields such as the test ID, name, type, access information, and timestamps without including the full test definition (chat history, evaluation criteria, etc.). This model is designed for list views and overview screens.

Usage

This model is returned by API endpoints that list unit tests in a summary format. It provides sufficient information to display test entries in a list or table, enabling users to identify tests by name, check when they were created or last updated, and determine their type, without fetching the full test definition.

Code Reference

Source Location

src/elevenlabs/types/unit_test_summary_response_model.py

Class Signature

class UnitTestSummaryResponseModel(UncheckedBaseModel):
    ...

Import Statement

from elevenlabs.types.unit_test_summary_response_model import UnitTestSummaryResponseModel

I/O Contract

Field Name Type Required Default Description
id str Yes N/A The ID of the test
name str Yes N/A Name of the test
access_info Optional[ResourceAccessInfo] No None The access information of the test
created_at_unix_secs int Yes N/A Creation time of the test in Unix seconds
last_updated_at_unix_secs int Yes N/A Last update time of the test in Unix seconds
type UnitTestCommonModelType Yes N/A Type of the test

Usage Examples

Listing Unit Test Summaries

from elevenlabs.types.unit_test_summary_response_model import UnitTestSummaryResponseModel
import datetime

# Assuming `tests` is a list of UnitTestSummaryResponseModel
for test in tests:
    created = datetime.datetime.fromtimestamp(test.created_at_unix_secs)
    updated = datetime.datetime.fromtimestamp(test.last_updated_at_unix_secs)
    print(f"Test: {test.name} (ID: {test.id})")
    print(f"  Type: {test.type}")
    print(f"  Created: {created}")
    print(f"  Last updated: {updated}")

Sorting and Filtering Tests

# Sort tests by last updated time (most recent first)
sorted_tests = sorted(tests, key=lambda t: t.last_updated_at_unix_secs, reverse=True)

# Find tests updated in the last 24 hours
import time
one_day_ago = int(time.time()) - 86400
recent_tests = [t for t in tests if t.last_updated_at_unix_secs > one_day_ago]
print(f"Tests updated in last 24 hours: {len(recent_tests)}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment