opea-project / GenAIComps

GenAI components at micro-service level; GenAI service composer to create mega-service
Apache License 2.0
76 stars 140 forks source link

Bugfix for follow-up query with a .png image #900

Closed mhbuehler closed 1 week ago

mhbuehler commented 1 week ago

Description

Fixes a bug in the dataprep-multimodal-redis microservice where non-zero time metadata was being stored for .png images. This was resulting in an exception ValueError: invalid literal for int() being thrown and displayed in the MultimodalQnA UI during follow-up queries.

Issues

Related to the Image_and_Audio_Support_in_MultimodalQnA RFC

Type of change

List the type of change like below. Please delete options that are not relevant.

Dependencies

N/A

Tests

N/A

mhbuehler commented 1 week ago

the title mentions png, but understand that it is for mp4 video file. good to put some explanations for only mp4 files supported.

I added comments inline. The mid_time_ms variable was a very large negative number for .png files causing a crash in the UI. This fix is setting the time to 0 for all images, but leaving .mp4 videos with the original calculated time.