OpenAI Use in Unity

Hi,
I am doing a project in unity that will have NPC. The NPC dialogues will be generated by chatGPT. I saw just some tutorials of how to intregated an openAI into Unity. I use this library GitHub - OkGoDoIt/OpenAI-API-dotnet: An unofficial C#/.NET SDK for accessing the OpenAI GPT-3 API to intregate it in unity. When I put the folder OpenAI_API from this library it says the error of missing Newtonsoft reference and missing jsonproperty. Does anyone have any idea how I can fix it? If you need more context on the problem I will give it, I just summary the problem.

The package depends on NewtonsoftJson. This is not included automatically.
Add package by name in the package manager → com.unity.nuget.newtonsoft-json

Thanks for your respond. I had visit that page but is says that is no longer supported

What do you mean by no longer supported?

My apologize I misread, it says is not supported and we have to use it of our own risk.

That message is old and removed in later versions. But what they intended to say was that they don’t support it as in making bug fixes for Newtonsoft Json. It is a third party plugin not made by Unity. https://www.newtonsoft.com/json

One of the unity devs used a fork made by JilleJr (now known as AppleJag).
Which became the package https://docs.unity3d.com/Packages/com.unity.nuget.newtonsoft-json@3.2/manual/index.html so they could use it for themselves.
Newtonsoft Json is a well known package and used by a lot of devs.

Thank you very much for clearing my doubts on using this package. I download the source code and I install it through package manager right?

Open the package manager in Unity.
Window -> Package Manager
Click on the + and select Add package by name
Fill in com.unity.nuget.newtonsoft-json

you should just use my package, it’s based off that nuget package but is native for unity.

also supports threads and agents:
https://github.com/RageAgainstThePixel/com.openai.unity