1.1 KiB
1.1 KiB
Feature: OpenAI Vision Integration (PyObjC)
Description
Implement the logic to capture a frame from the AppKit interface and send it to OpenAI's API.
Requirements
-
Image Handling:
- On "Capture" click:
- Stop/Pause the live feed update.
- Store the current frame (in memory).
- Show "Processing..." (maybe change button text or add a label).
- On "Capture" click:
-
OpenAI API Call:
- Async handling is important to not block the UI thread (spinning beachball).
- Run the API request in a background thread (
threading). - Model:
gpt-5-mini(fallbackgpt-4o-mini). - Prompt: "What is this item? Please provide a brief description."
-
Response Handling:
- When response returns, schedule a UI update on the main thread (
performSelectorOnMainThread:ordispatch_async). - Print response to console (UI display comes in Spec 003).
- When response returns, schedule a UI update on the main thread (
Acceptance Criteria
- UI remains responsive (no beachball) during API call.
- "Processing..." indication is shown.
- Image frame is correctly sent to OpenAI.
- Text response is received and printed to console.