Repository navigation
Pick clips in a pass of their own, one video at a time - #25
Merged
Merged
Conversation
find_clips hands one video's whole transcript, numbered by sentence, and the idea a scene needs to a separate model call with no tools, and gives the turn back only the best passages: a ready trim, what is said, a score and why. The turn's own conversation no longer has to carry every transcript it weighs on every round, and the picker judges passages with nothing else to do. The picker names lines, never times, so a cut can't land on a moment it made up; a passage naming lines it wasn't shown is dropped. Long videos are read in overlapping windows of about 15k tokens and the best of all kept. Calls are capped per request (ASSISTANT_MAX_CLIP_PICKS, 16), cached per video and idea, and billed to the turn like any other call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1geD2rbaPtRa9JcN8sZH8
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.
Why
Since #24 the assistant can read whole transcripts, but it reads them inside its own conversation. Everything it reads there is sent again on every later round, so weighing several long interviews gets expensive quickly. The model also has to judge passages while it is busy writing a video.
What changes
find_clips(gam_id, idea, count=3)is a new assistant tool. It hands one video's whole transcript (numbered sentences) and the idea a scene needs to a separate model call with no tools, using the user's own provider. Only the best passages come back to the request, each with:trimforset_visual,ASSISTANT_MAX_CLIP_PICKS(default 16). Over the cap, the tool tells the model to useread_transcriptinstead.find_clipseach, compare across videos, thenset_visualwith the chosen trim.read_transcriptstays for checking context, or as a fallback._padded) is shared by the automatic hit trim and the picked clips.No GAM changes are needed.
Testing
pytest -q: 719 passed. New tests cover:count,npm test && npm run build: 187 passed and the build succeeds (no frontend changes).Generated by Claude Code