miscellaneous / probe_gpt55_one_sample.py
Rakancorle11's picture
Upload supp/ and root scripts
203a7fb verified
"""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