From c5a546158d1d8f0ac769278f17c93d083ce02db0 Mon Sep 17 00:00:00 2001 From: Jack McGuire Date: Sun, 10 Nov 2024 03:16:04 +0000 Subject: [PATCH] fix: dall-e parameters & default image model --- cmd/alexa/main.go | 1 + internal/dom/chatmodels/gpt_api.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/alexa/main.go b/cmd/alexa/main.go index bd5750d..086887d 100644 --- a/cmd/alexa/main.go +++ b/cmd/alexa/main.go @@ -27,6 +27,7 @@ func main() { PollDelay: pollDelay, Logger: logger, Model: chatmodels.CHAT_MODEL_GPT, + ImageModel: chatmodels.IMAGE_MODEL_STABLE_DIFFUSION, } lambda.Start(h.Invoke) } diff --git a/internal/dom/chatmodels/gpt_api.go b/internal/dom/chatmodels/gpt_api.go index 22eba95..26fb063 100644 --- a/internal/dom/chatmodels/gpt_api.go +++ b/internal/dom/chatmodels/gpt_api.go @@ -47,8 +47,9 @@ func (api *OpenAIApiClient) GenerateImage(ctx context.Context, prompt string, mo req := openai.ImageRequest{ Model: model, Prompt: prompt, - Size: openai.CreateImageSize256x256, + Size: openai.CreateImageSize1024x1024, ResponseFormat: openai.CreateImageResponseFormatB64JSON, + Quality: "standard", N: 1, }