mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-05-12 02:19:59 +08:00
fix: 将image/jpg MIME类型转换为标准的image/jpeg
修复了图像转换过程中的MIME类型处理,确保当遇到非标准的"image/jpg"类型时,将其转换为标准的"image/jpeg"类型。这样可以提高与接收图像数据的API和系统的兼容性
This commit is contained in:
@@ -45,7 +45,7 @@ def _convert_image(image_url: str) -> Dict[str, Any]:
|
||||
mime_type, encoded_data = _get_mime_type_and_data(image_url)
|
||||
return {
|
||||
"inline_data": {
|
||||
"mime_type": mime_type,
|
||||
"mime_type": "image/jpeg" if mime_type == "image/jpg" else mime_type,
|
||||
"data": encoded_data
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user