OpenAI-API-dotnet icon indicating copy to clipboard operation
OpenAI-API-dotnet copied to clipboard

IHttpClientFactory Missing a "using" from source code

Open EliasBorrajo opened this issue 2 years ago • 1 comments

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:

  1. Download source file
  2. Unzip it
  3. 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?)

image

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. image

EliasBorrajo avatar Nov 02 '23 10:11 EliasBorrajo

I had the same issue. I solved it in the following way:

  1. On Github go to https://github.com/GlitchEnzo/NuGetForUnity
  2. Go to the Releases and download the Unity Package.
  3. Install it as a package in Unity. This adds a nice NuGet Manager for Unity!
  4. In the menu go to: NuGet-Manage PAckages
  5. In the search box type: Microsoft.Extensions.DependencyInjection and install it
  6. In the search box type: Microsoft.Extensions.Http and install it
  7. 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!

NITechLabs avatar Feb 29 '24 08:02 NITechLabs