AI-Code-Translator icon indicating copy to clipboard operation
AI-Code-Translator copied to clipboard

Some models are already deprecated; gpt-4o worked today

Open amlynnworth opened this issue 1 year ago • 0 comments

I really love the idea of this code translation project.

Here are a few notes about what helped me to make this run today :

  • I had to look up the current chatgpt model codes and adjust VersionEdit.Items.Strings, specifically adding 'o' to the gpt-4' choice, to avoid typing that in each time.

  • To troubleshoot errors such as deprecated model codes and no-access-to-this-model, in procedure TMainForm.TranslateButtonClick after RESTRequest1.Execute I reported the following properties because the '404' status code raised by the win32 debugger was an oversimplification whereas the Response.Content had a very useful descripition of the problem:

        RESTRequest1.Response.StatusCode
        RESTRequest1.Response.Content
  • To make a usable API key, I had to add $$ to my account, generate a new secret API key, and use that.

Sadly in the end, gpt-4o refused to port my python unit to pascal. Its reasons were somewhat valid, having to do with third party dependencies.

amlynnworth avatar Sep 17 '24 06:09 amlynnworth