Repository navigation
docs: use non-deprecated fields in generate examples - #173
Merged
Merged
Conversation
- ai_image_generator: orientation -> aspect_ratio, resolution "auto" -> "1k" - ai_image_upscaler: style.enhancement -> style.mode - text_to_video: orientation -> aspect_ratio - character_replace: pass fields as kwargs instead of an unsupported data= dict - make orientation optional in async text_to_video/ai_image_generator generate() so the examples run without it; widen generate() resolution hint to match create() Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reverts the client.py edits. Async generate() still requires orientation, so the async examples keep it until the generated signature changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
These README
generateexamples feed web-app's API code samples through the sample sync automation. Several used deprecated fields or didn't match the method signature.What (docs only, no code changes)
ai_image_generator,text_to_video(sync examples):orientation→aspect_ratio;resolution="auto"→"1k".ai_image_upscaler: deprecatedstyle.enhancement→style={"mode": "balanced"}.character_replace: examples wrapped every field indata={...}, whichgenerate()doesn't accept (TypeError). They now pass keyword arguments.The async examples for
ai_image_generatorandtext_to_videostill passorientation, because the generated asyncgenerate()still requires it. That needs a fix in the generated code, not in these docs.🤖 Generated with Claude Code