Skip to content

Commit

Permalink
[HOTFIX] Fix bug in checking local or remote file on Windows (#499)
Browse files Browse the repository at this point in the history
Co-authored-by: unknown <[email protected]>
  • Loading branch information
dukesun99 and unknown authored Dec 6, 2024
1 parent 9aa404a commit daa79e7
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 daa79e7

Please sign in to comment.