betalgo / openai

OpenAI .NET sdk - Azure OpenAI, ChatGPT, Whisper, and DALL-E
https://betalgo.github.io/openai/
MIT License
2.88k stars 520 forks source link

Does this currently work with Models Gpt_4 or the other gpt models? #259

Closed fitprotracker closed 1 year ago

fitprotracker commented 1 year ago

I am trying the following code:

var completionResult = await openAiService.ChatCompletion.CreateCompletion( new ChatCompletionCreateRequest { Messages = messages, Model = Models.Gpt_4, User = userId } );

Getting this error:

OpenAI.GPT3.ObjectModels.ResponseModels.ChatCompletionCreateResponse

{Error { Code = model_not_found, Message = The model: gpt-4 does not exist, Param = , Type = invalid_request_error }}

I have been using this model with now problems: Model = Models.ChatGpt3_5Turbo

Any thoughts on that? Thanks again for this library!!!

Swimburger commented 1 year ago

I used the same code and did not have an issue. Do you have access to the GPT4 API? You can request API access to GPT4 here.

kayhantolga commented 1 year ago

Thanks🙏🏻. As @Swimburger stated, the problem is most likely due to @fitprotracker not having access to the GPT-4 model. I will close the ticket. If this is not the issue, please reopen it.