Add Anthropic Sonnet-powered LLM GIF generation pipeline#2
Open
apshoemaker wants to merge 1 commit into
Open
Conversation
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.
Motivation
Description
nd75_screen/llm_gif.pyto call the Anthropic Messages API, parse a JSON storyboard, render frames at135x240(ND75) and emit GIF bytes viagenerate_gif_bytes_from_prompt.nd75_screen.cli.llm(nd75-llm-gif) that accepts apromptand writes generated GIF bytes tostdoutfor piping intond75-push.tests/test_cli_llm.pywith TDD-first coverage for CLI stdout behavior, default model wiring (DEFAULT_MODEL), rendering to ND75 size, and readingANTHROPIC_API_KEYfrom the environment.anthropic>=0.84.0dependency and thend75-llm-gifscript inpyproject.toml, updatedREADME.mdwith usage examples, and updated the lockfile to include the new deps.Testing
uv run pytest tests/test_cli_llm.py -qinitially to confirm the red test (module missing) during TDD, then re-ran after implementation and observed3 passedfor that file.uv run pytest tests/ -qand observed79 passedindicating no regressions across the project.uv run python -m nd75_screen.cli.llm --help, which produced the expected usage output.Codex Task