콘텐츠로 이동

get_captions_batch

Batch retrieval of captions for multiple videos.


Overview

Retrieves caption segments for multiple videos at once in a single batch.

Function Signature

def get_captions_batch(
    feature_view: str,
    metadata: pd.DataFrame
) -> pd.DataFrame

Description

Retrieves captions for multiple videos in a batch. It takes the output of search_metadata() as input and retrieves all captions for each video.


Parameters

Parameter Type Default Description
metadata pd.DataFrame required Return value from the search_metadata() function
Must include the following columns: uuid, model, config_source, timestamp, segment_ids

Returns

Type: pd.DataFrame

Columns: uuid, model, config_source, timestamp, segment_id, index, start, end, text

Sort Order: Ascending order by uuid, model, config_source, timestamp, and index.


Example

# 1. Search metadata
metadata = search_metadata(
    feature_view='caption_summary',
    models=['gpt-4o']
)

# 2. Batch retrieval
all_captions = get_captions_batch(
    feature_view='caption_summary',
    metadata=metadata
)

print(f"Total segments: {len(all_captions)}")

Output:

Total segments: 452