We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 331109b commit 9a952b7Copy full SHA for 9a952b7
src/agentscope/formatter/_openai_formatter.py
@@ -86,7 +86,8 @@ def _to_openai_image_url(url: str) -> str:
86
87
# Web url
88
if not os.path.exists(url) and parsed_url.scheme != "":
89
- if any(lower_url.endswith(_) for _ in support_image_extensions):
+ path_lower = parsed_url.path if parsed_url.path else parsed_url.netloc
90
+ if any(path_lower.endswith(_) for _ in support_image_extensions):
91
return url
92
93
# Check if it is a local file
0 commit comments