From a408f5c1a342ea99f17e7b0dbc2be50fae7e0587 Mon Sep 17 00:00:00 2001 From: Zhichao Date: Wed, 28 Aug 2024 19:05:58 +0800 Subject: [PATCH] more strict check for vision-agent-ui --- vision_agent/lmm/lmm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision_agent/lmm/lmm.py b/vision_agent/lmm/lmm.py index 1881c0bd..b9f7ec54 100644 --- a/vision_agent/lmm/lmm.py +++ b/vision_agent/lmm/lmm.py @@ -33,7 +33,7 @@ def encode_media(media: Union[str, Path]) -> str: if type(media) is str and media.startswith(("http", "https")): # for mp4 video url, we assume there is a same url but ends with png # vision-agent-ui will upload this png when uploading the video - if media.endswith((".mp4", "mov")): + if media.endswith((".mp4", "mov")) and media.find('vision-agent-dev.s3') != -1: return media[:-4] + ".png" return media extension = "png"