Merhabalar, asp.net c# web tabanlı projemde open ai entegrasyonu yapmaya çalışırken aşağıdaki hatayı alıyorum.

Error at completions (https://api.openai.com/v1/completions) with HTTP status code: NotFound. Content: { "error": { "message": "This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?", "type": "invalid_request_error", "param": "model", "code": null } }



Projemdeki kodlar bu şekilde

var openAiApiKey = "";

APIAuthentication aPIAuthentication = new APIAuthentication(openAiApiKey);
OpenAIAPI openAiApi = new OpenAIAPI(aPIAuthentication);


try
{
string prompt = "Nasılsın";
string model = "gpt-4";
int maxTokens = 50;

var completionRequest = new CompletionRequest
{
Prompt = prompt,
Model = model,
MaxTokens = maxTokens


};

var completionResult = await openAiApi.Completions.CreateCompletionAsync(comple tionRequest);
var generatedText = completionResult.Completions[0].Text; //completionResult.Choices[0].Text.Trim();

lblUyari.Text = generatedText;
}
catch (Exception ex)
{
lblUyari.Text = ex.Message;