OkGoDoIt / OpenAI-API-dotnet

An unofficial C#/.NET SDK for accessing the OpenAI GPT-3 API

Home Page:https://www.nuget.org/packages/OpenAI/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot upload files, no ImageInput.FromFile()

JulesVerny opened this issue · comments

Some of this code does not compile. For example ImageInput.FromFile( ) is not in any of the standard C# or anywhere in this package.

How are we supposed to upload Image files from our local drives, if this code does not compile ?

TheOpenAI_api.Chat.GetResponseFromChatbotAsync( ) does not seem available either.

It's possible you are referencing a different version of the library, or perhaps you need to add the namespace to your using's. The fully qualified name is OpenAI_API.Chat.ChatMessage.ImageInput

ImageInput is defined in https://github.com/OkGoDoIt/OpenAI-API-dotnet/blob/master/OpenAI_API/Chat/ChatMessage.cs#L222 within OpenAI_API.Chat.ChatMessage

Are you using v1.11 or v1.10 or v1.9? ImageInput was added in v1.9.

There is also a new v2.0 beta that has a completely different architecture, so if you are using that one, please check out its new readme instead: https://github.com/openai/openai-dotnet/blob/main/README.md