[New] LLM corrupted image detection#240
Merged
douglasdotc merged 25 commits intomainfrom Apr 24, 2026
Merged
Conversation
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Robot Framework keyword to use the configured multimodal LLM to assess whether the current screenshot (or a provided image) appears corrupted, and updates the generated library reference docs accordingly.
Changes:
- Add
Detect Corrupted Imagekeyword toLlmClient(screenshot capture + LLM prompt + JSON parsing). - Add helper to fetch other RF library instances via
BuiltIn().get_library_instance. - Regenerate reference docs for the new keyword.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| yarf/rf_libraries/libraries/llm_client/LlmClient.py | Adds the new corrupted-image detection keyword and related helper/validation logic. |
| docs/reference/rf_libraries/libraries/llm_client/library-LlmClient.md | Documents the newly added keyword in the generated RF library reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+157
to
+163
| @keyword | ||
| async def detect_corrupted_image( | ||
| self, | ||
| image: Image.Image | None = None, | ||
| custom_prompt: str | None = None, | ||
| ) -> dict[str, Any]: | ||
| """ |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
p-gentili
requested changes
Apr 21, 2026
Collaborator
p-gentili
left a comment
There was a problem hiding this comment.
Cool stuff! Some comments below, mostly to focus more on UX and stability.
Co-authored-by: Paolo Gentili <paolo.gentili@canonical.com>
fernando79513
requested changes
Apr 21, 2026
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
p-gentili
reviewed
Apr 22, 2026
p-gentili
reviewed
Apr 22, 2026
Co-authored-by: Paolo Gentili <paolo.gentili@canonical.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
p-gentili
reviewed
Apr 22, 2026
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
p-gentili
previously requested changes
Apr 23, 2026
Collaborator
p-gentili
left a comment
There was a problem hiding this comment.
Found some issues in the code itself
Co-authored-by: Paolo Gentili <paolo.gentili@canonical.com>
Co-authored-by: Paolo Gentili <github@login.pgentili.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
p-gentili
reviewed
Apr 24, 2026
Co-authored-by: Paolo Gentili <paolo.gentili@canonical.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.com>
Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>
Signed-off-by: Douglas Chiang <douglasdothnc@gmail.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.

Description
This PR adds a new keyword to detect corrupted images.
Resolved issues
ZAP-1424
Documentation
Added automatically
Tests