소스 검색

feat: Improve image generation quality selection

The code change adds a conditional statement to select the image generation quality based on the selected image model.
Kumi 1 년 전
부모
커밋
14da88de8b
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/gptbot/classes/openai.py

+ 1 - 0
src/gptbot/classes/openai.py

@@ -228,6 +228,7 @@ Only the event_types mentioned above are allowed, you must not respond in any ot
         image_partial = partial(
             self.openai_api.images.generate,
                 model=self.image_model,
+                quality="standard" if self.image_model != "dall-e-3" else "hd",
                 prompt=prompt,
                 n=1,
                 size="1024x1024",