OkGoDoIt / OpenAI-API-dotnet

An unofficial C#/.NET SDK for accessing the OpenAI GPT-3 API
https://www.nuget.org/packages/OpenAI/
Other
1.86k stars 432 forks source link

Model.GPT4 still selects gpt-3 model #175

Closed naveedahmed1 closed 11 months ago

naveedahmed1 commented 1 year ago

When I run the below code:

prompt = "Say hello and tell the selected gpt model for this api call";
await foreach (var token in api.Chat.StreamChatEnumerableAsync(new ChatRequest()
{
    Model = Model.GPT4,
    Temperature = 1,
    NumChoicesPerMessage = 1,
    Messages = new ChatMessage[] {
                new ChatMessage(ChatMessageRole.User, prompt)
            }
}))
{
    yield return result;
}

It returns Hello! The selected GPT model for this API call is gpt-3.

Can anyone please guide? Am I missing something?

OkGoDoIt commented 11 months ago

I don't think the model actually knows its own name. I've verified this discrepancy exists in the API playground as well. Please note the API is not that same as ChatGPT, which may well have more information about its own model.

So this doesn't actually indicate it's not running on GPT-4 when you tell it to. You can verify with an http sniffer to confirm.

image