fixbug: fix 图片

This commit is contained in:
莘权 马 2023-09-02 22:28:56 +08:00
parent 5980b08c80
commit bf6388d171

View file

@ -35,5 +35,5 @@ async def text_to_image(text, size_type: str = "512x512", openai_api_key="", mod
s3 = S3()
url = await s3.cache(data=base64_data, file_ext=".png", format=BASE64_FORMAT)
if url:
return f"[{text}]({url})"
return f"![{text}]({url})"
return image_declaration + base64_data if base64_data else ""