Skip to content

Commit

Permalink
Fix bug in checking local or remote file on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Dec 4, 2024
1 parent 9aa404a commit 374e190
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/agentscope/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 374e190

Please sign in to comment.