ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

Image Generation on Demand -> error: Invalid model . The model argument should be left blank.

Open OrtmannMedia opened this issue 1 year ago • 4 comments

When, I switch on Image Generation on Demand, and enter some text to generate a picture, it comes the error "Invalid model . The model argument should be left blank.". But in the settings, it can not be left blank, it seams to always use a model as default. What do you suggest? And shouldn't be used model "dall-e-3" as parameter for image generation?

OrtmannMedia avatar Sep 06 '24 16:09 OrtmannMedia

Did you build the project yourself or are you using the release version?

HemulGM avatar Sep 07 '24 08:09 HemulGM

I downloaded source from here from the Code section, including your suggested linked source of DelphiOpenAI, OWM_API, TPocessDelphi, WindowsDarkMode. And build it by myself, using Delphi12, for Win32.

Now, today, I tried the release EXE: The EXE works without problems.

Then, now I tried the "Source code" in the Releases. In the source, again many subfolders are empty, so I added all the missing things, like DelphiOpenAI, OWM_API, TPocessDelphi, WindowsDarkMode, and also the HGM components. Which again I need to download from the code repositories. But it does not compile. First in ChagGPT.dpr, I need to change Skia.FMX to FMX.Skia. Second in FMX.Memo.Style in procedure TStyledMemo.PMFragmentInserte, it says FragmentLength is undefined. Finally, with the given source it can not be compiled in the way it is published, my Delphi does not like it :)

OrtmannMedia avatar Sep 07 '24 11:09 OrtmannMedia

Hello,

In Chat.FrameChat.pas, In procedure TFrameChat.RequestImage(const Prompt: string); this work for image : `

      procedure(Params: TImageCreateParams)
      begin
        Params.Prompt(Prompt);
        Params.ResponseFormat(TImageResponseFormat.Url);
        Params.N(1);//Params.N(4);
        Params.Model('dall-e-3');  // Params.Model('');
        Params.Size(TImageSize.s1024x1024);
        Params.User(FChatId);
      end);

`

Fab8573 avatar Oct 16 '24 14:10 Fab8573

Thank you very much, yes this works to generate a picture in "Image Generation on Demand" :) As for pushing the button "Send prompt", instead of text requests, it also requests pictures. So finally, from the three modes Audio, Prompt, Image Generation, only the later works in the demo source code, thanks to your good improvement. It seams the original source is not consistent at all, in the given status.

OrtmannMedia avatar Oct 16 '24 18:10 OrtmannMedia