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

Added latest GPT4 Omni and replaced preview GPT4 models with gpt-4-turbo #214

Open glienard opened 6 months ago

spppaul commented 6 months ago

Please get this into nuget soon :)

It would be better if you could provide a string override so people didn't have to wait for you to make a change when a new model was introduced.

GuyEzro commented 6 months ago

is it possible to add support for vectorStore?

shotyme commented 6 months ago

Great, please merge this asap!

ghostrider0470 commented 6 months ago

really urgently required , thanks for making this PR

OkGoDoIt commented 5 months ago

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";

Unfortunately I’m not able to make any updates for the next couple weeks, and I can’t publicly announce what’s up for another week or two. But I promise you it’ll be worth the wait. Keep an eye on the official Microsoft blogs perhaps 😉

spppaul commented 5 months ago

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. There’s an implicit cast of string to Model

Unfortunately I’m not able to make any updates for the next couple weeks, and I can’t publicly announce what’s up for another week or two. But I promise you it’ll be worth the wait. Keep an eye on the official Microsoft blogs perhaps 😉

This worked for me:

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

...... var response = await openAi.Chat.CreateChatCompletionAsync( new ChatRequest { Model = GPT4_Omni, ......