OpenAI-API-dotnet
OpenAI-API-dotnet copied to clipboard
IHttpClientFactory Missing a "using" from source code
Hello, this is my first time doing an issue report, so sorry if any info is missing.
I'm following the tutorial from: https://www.youtube.com/watch?v=gI9QSHpiMW0 I'm working with Unity and I'm integrating OpenIA to my project. The procedure is as follows:
- Download source file
- Unzip it
- Put it in the project folder
Then I get the following problem: Compiler Error CS0246 : The type or namespace name 'type/namespace' could not be found (are you missing a using directive or an assembly reference?)
I don't know how to fix it, but I will simply just not use it I think, and comment it out. But maybe just using a library could fix it ?
Those are the suggestions for the fix.
I had the same issue. I solved it in the following way:
- On Github go to https://github.com/GlitchEnzo/NuGetForUnity
- Go to the Releases and download the Unity Package.
- Install it as a package in Unity. This adds a nice NuGet Manager for Unity!
- In the menu go to: NuGet-Manage PAckages
- In the search box type: Microsoft.Extensions.DependencyInjection and install it
- In the search box type: Microsoft.Extensions.Http and install it
- In the search box type: Newtonsoft.Json and install it Now the OpenAI will not generate any errors anymore when you drop it into your project!