Skip to content

_#424

Merged
xtsea merged 2 commits into
betafrom
dev
Sep 12, 2025
Merged

_#424
xtsea merged 2 commits into
betafrom
dev

Conversation

@xtsea

@xtsea xtsea commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Introduce an edit_check_only flag to conditionally route Gemini image edit requests to the preview endpoint and update the package version.

Enhancements:

  • Add edit_check_only parameter to image edit method to toggle between standard and preview edit endpoints

Chores:

  • Bump Ryzenth version from 2.4.1 to 2.4.2

@sourcery-ai

sourcery-ai Bot commented Sep 12, 2025

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Introduced an optional flag to switch between full image editing and a preview endpoint by adding the edit_check_only parameter and conditional path logic in the API request, and bumped the package version to 2.4.2.

Sequence diagram for toggling between image edit and preview endpoints

sequenceDiagram
participant Caller
participant "__call__()"
participant Client
participant API
Caller->>"__call__()": Call with prompt, file_path, edit_check_only
"__call__()"->>Client: Get client
alt edit_check_only = True
    Client->>API: POST /api/v1/gemini-latest/image-preview/edit
else edit_check_only = False
    Client->>API: POST /api/v1/gemini-latest/imagen/edit
end
API-->>Client: Response
Client-->>"__call__()": Return result
"__call__()"-->>Caller: Return GeneratedImageOrVideo
Loading

File-Level Changes

Change Details Files
Add edit_check_only parameter and conditional endpoint selection
  • Added edit_check_only boolean parameter to the call signature
  • Defined path variable using ternary logic based on edit_check_only
  • Replaced hardcoded endpoint with the new path variable in client.post
Ryzenth/_callbody/_call_image_gemini_edit.py
Bump package version
  • Updated version constant from 2.4.1 to 2.4.2
Ryzenth/__version__.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@xtsea xtsea merged commit b75c9a8 into beta Sep 12, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant