diff --git a/nonebot_plugin_marshoai/marsho.py b/nonebot_plugin_marshoai/marsho.py index cb323c6f..3438169a 100644 --- a/nonebot_plugin_marshoai/marsho.py +++ b/nonebot_plugin_marshoai/marsho.py @@ -268,6 +268,7 @@ async def marsho( ) # type: ignore ).as_dict() # type: ignore ) # type: ignore + logger.info(f"输入图片 {i.data['url']}") elif config.marshoai_enable_support_image_tip: await UniMessage( "*此模型不支持图片处理或管理员未启用此模型的图片支持。图片将被忽略。" diff --git a/nonebot_plugin_marshoai/util.py b/nonebot_plugin_marshoai/util.py index 1c45c75c..5380f1a4 100755 --- a/nonebot_plugin_marshoai/util.py +++ b/nonebot_plugin_marshoai/util.py @@ -96,7 +96,9 @@ async def get_image_b64(url: str, timeout: int = 10) -> Optional[str]: return: 图片base64编码 """ - if data_type := await get_image_raw_and_type(url, timeout): + if data_type := await get_image_raw_and_type( + url.replace("https://", "http://"), timeout + ): # image_format = content_type.split("/")[1] if content_type else "jpeg" base64_image = base64.b64encode(data_type[0]).decode("utf-8") data_url = "data:{};base64,{}".format(data_type[1], base64_image)