diff --git a/AIVision/library.py b/AIVision/library.py index b95864c..f70ba6e 100644 --- a/AIVision/library.py +++ b/AIVision/library.py @@ -477,7 +477,11 @@ def add_watermark_to_image( def _assert_result(self, response): result, explanation = self.genai.extract_result_and_explanation_from_response(response) - if result and result.strip().lower() == "pass": + try: + logger.debug(f"AI Result is: ==>{result.strip().lower()}<==") + except: + logger.debug("AI Result not returned.") + if result and "pass" in result.strip().lower(): logger.info(f"Verification passed:\n{explanation}") else: raise AssertionError(f"Verification failed:\n{explanation}") diff --git a/CHANGES.txt b/CHANGES.txt index ee30b39..31158bd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,4 @@ +1.1.2, 2026-02-09 -- Improved debug logging 1.1.1, 2026-02-09 -- Pass/Fail AI response optimized 1.1.0, 2026-02-08 -- Added support for (text) files attachments 1.0.0, 2026-02-02 -- Release v1.0 diff --git a/setup.py b/setup.py index bb6c56f..4c0eb9a 100644 --- a/setup.py +++ b/setup.py @@ -35,10 +35,16 @@ def license(): def readme(): changes_title = '\n\nVersion history\n----------------\n\n' + formatted_changes = [] - with open('README.md') as r: - with open('CHANGES.txt') as ch: - return r.read() + changes_title + ch.read() + with open('CHANGES.txt', 'r') as ch: + for line in ch: + stripped_line = line.strip() + if stripped_line: + formatted_changes.append(f'- {stripped_line}') + + with open('README.md', 'r') as r: + return r.read() + changes_title + '\n'.join(formatted_changes) + '\n' setup(name='robotframework_aivision',