File size: 1,163 Bytes
203a7fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""Probe GPT-5.5 on a single real video frame batch — see if we get non-empty content.

Usage: OPENAI_API_KEY=sk-... python3 /home/ubuntu/probe_gpt55_one_sample.py
"""
import os, sys
sys.path.insert(0, "/home/ubuntu")
from pathlib import Path
from case_study_gpt55 import (
    call_gpt_frames, extract_frames_b64, _client,
    SYNC_PROMPT, ORIG_DIR,
)

if not os.environ.get("OPENAI_API_KEY"):
    sys.exit("[error] need OPENAI_API_KEY")

client = _client(os.environ["OPENAI_API_KEY"])
sample = ORIG_DIR / "Anger Management - Fails of the Week (January 2019) _ FailArmy11.mp4"
print(f"sample: {sample}  exists={sample.exists()}")

frames = extract_frames_b64(sample, n_frames=8)
print(f"extracted {len(frames)} frames")

for budget, effort in [(4000, "minimal"), (2000, "low"), (8000, "minimal")]:
    print(f"\n--- max_completion_tokens={budget}  reasoning_effort={effort} ---")
    raw = call_gpt_frames(client, "gpt-5.5", SYNC_PROMPT, frames,
                          max_tokens=budget, reasoning_effort=effort)
    print(f"raw_output ({len(raw)} chars): {raw!r}")
    if raw:
        print("OK -- got content; you can re-run the full eval")
        break