mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-04-24 18:34:31 +08:00
feat: Make the size parameter of the resulting picture configurable
This commit is contained in:
@@ -20,7 +20,7 @@ class OpenAIImage(object):
|
||||
response = openai.Image.create(
|
||||
prompt=query, #图片描述
|
||||
n=1, #每次生成图片的数量
|
||||
size="256x256" #图片大小,可选有 256x256, 512x512, 1024x1024
|
||||
size=conf().get('image_create_size', "256x256") #图片大小,可选有 256x256, 512x512, 1024x1024
|
||||
)
|
||||
image_url = response['data'][0]['url']
|
||||
logger.info("[OPEN_AI] image_url={}".format(image_url))
|
||||
|
||||
Reference in New Issue
Block a user