diff --git a/src/agentscope/utils/common.py b/src/agentscope/utils/common.py index 372d9ca66..bfdadb4e8 100644 --- a/src/agentscope/utils/common.py +++ b/src/agentscope/utils/common.py @@ -295,7 +295,7 @@ def _to_openai_image_url(url: str) -> str: lower_url = url.lower() # Web url - if parsed_url.scheme != "": + if not os.path.exists(url) and parsed_url.scheme != "": if any(lower_url.endswith(_) for _ in support_image_extensions): return url