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 433 forks source link

[Request] Add support for gpt-4o model #215

Closed kamilk91 closed 5 months ago

glienard commented 6 months ago

@kamilk91 Added it in my pull request or you can get it at: https://github.com/glienard/OpenAI-API-dotnet

spppaul commented 6 months ago

Please merge this ASAP @kamilk91

spppaul commented 6 months ago

https://github.com/OkGoDoIt/OpenAI-API-dotnet/pull/214

scara1701 commented 6 months ago

I've added omni for now by extending the Model class in my project.

public class AIModelExtended : Model { public static Model GPT4_Omni => new Model("gpt-4o") { OwnedBy = "openai" }; }

faster-than-human commented 5 months ago

Does anyone know what the hold up is on getting this done?

OkGoDoIt commented 5 months ago

I’m unfortunately not allowed to announce the details publicly for another week or two, but I promise it’ll be worth the wait. There’s gonna be a lot better and more official support coming soon. Keep an eye on the Microsoft blogs 😉

In the meantime, you can always pass in the model name as a string rather than using the strongly typed models class. Just use the model name identifier string that’s in the official OpenAI API docs. There’s an implicit cast of string to Model.

For example:

var chat = api.Chat.CreateConversation();
chat.Model = "gpt-4o";
scottaddie commented 5 months ago

Does anyone know what the hold up is on getting this done?

Here's the Microsoft blog post Roger mentioned above: https://devblogs.microsoft.com/dotnet/openai-dotnet-library/

OkGoDoIt commented 5 months ago

As @scottaddie mentioned, it's official! Microsoft is launching an official library, which means full API coverage and up-to-date models going forward. More details in #211 and at the blog at https://devblogs.microsoft.com/dotnet/openai-dotnet-library/