feat: add bjj-vqa generate CLI with Gemini + frame extraction#45
Open
clawdinhobot wants to merge 2 commits intomainfrom
Open
feat: add bjj-vqa generate CLI with Gemini + frame extraction#45clawdinhobot wants to merge 2 commits intomainfrom
clawdinhobot wants to merge 2 commits intomainfrom
Conversation
Collaborator
Author
|
Fixed ty check error in generate module — added inline |
Collaborator
Author
|
Opened PR #46 to fix the pre-existing ty errors on main. Once merged, validate CI should pass on this PR too. |
Owner
|
I merged #46, please rebase. |
Rewrite generate prompt to request structured JSON output. Implement 'bjj-vqa generate <url>' that calls Gemini Flash via OpenRouter (video_url input), extracts frames via yt-dlp + ffmpeg, writes images with short UUID hex names, and appends records to data/samples.json. - Add yt-dlp>=2025.1.0 to project dependencies - Rename @pytest.mark.vision to @pytest.mark.integration - Add tests/test_generate.py with 3 integration tests - Existing 28 tests still pass (3 integration tests skipped) Closes #38
92009b5 to
3ad5348
Compare
Collaborator
Author
|
Branch is already up to date with main (includes PR #46 merge). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement
bjj-vqa generate <url>— calls Gemini Flash via OpenRouter with the YouTube URL, receives structured JSON, extracts frames via yt-dlp + ffmpeg, and appends records todata/samples.json.Changes
src/bjj_vqa/generate/prompt.md— rewritten to request structured JSON outputsrc/bjj_vqa/generate/__init__.py— generate module with:generate_questions(url)— calls Gemini via OpenRouter with video_url input_extract_frame(url, timestamp, output)— yt-dlp + ffmpeg frame extractionrun(url)— full pipeline: generate → extract frames → append to samples.jsonsrc/bjj_vqa/cli.py— addedgeneratesubcommandpyproject.toml— addedyt-dlp>=2025.1.0to dependencies, renamed@pytest.mark.visionto@pytest.mark.integrationtests/test_generate.py— 3 integration tests (skip without OPENROUTER_API_KEY)Acceptance criteria
yt-dlpadded to project dependenciesbjj-vqa generate <url>exits 0 and appends valid records todata/samples.jsondata/images/withuuid.uuid4().hex[:8]namesuv run bjj-vqa validatepasses after generatesrc/bjj_vqa/generate/prompt.mdrewritten to request structured JSON output@pytest.mark.visionrenamed to@pytest.mark.integrationeverywheretests/test_generate.pyuse real OpenRouter API, skip without keyCloses #38