Some models are already deprecated; gpt-4o worked today
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.TranslateButtonClickafterRESTRequest1.ExecuteI 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.