Skip to content

checking if content is blank in is_multimodal#333

Closed
SamCox822 wants to merge 1 commit intomainfrom
check-for-no-content-multimodal
Closed

checking if content is blank in is_multimodal#333
SamCox822 wants to merge 1 commit intomainfrom
check-for-no-content-multimodal

Conversation

@SamCox822
Copy link
Contributor

No description provided.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 15, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a potential bug in the is_multimodal property by adding a check for blank/None content before attempting to parse it as JSON.

Changes:

  • Added not self.content check in the is_multimodal property guard clause to prevent attempting to parse null or empty content

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

def is_multimodal(self) -> bool:
"""Check if content is encoded multimodal data."""
if not self.content_is_json_str:
if not self.content_is_json_str or not self.content:
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The edge case where content_is_json_str is True but content is None or empty lacks test coverage. Consider adding a test case to verify that is_multimodal correctly returns False when content is blank, even if content_is_json_str is True.

Copilot uses AI. Check for mistakes.
@SamCox822 SamCox822 closed this Jan 15, 2026
@jamesbraza jamesbraza deleted the check-for-no-content-multimodal branch January 15, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant