keijiro/AICommand

Compiling Error : AiCoomand.OpenAiUltil.InvokeChat error

jpupper opened this issue · 2 comments

Dear Unity Guru.

I hope this message finds you well. Yesterday, I came across a new ChatGPT plugin that you recently released, and I am very eager to try it out. However, I've encountered a compiling error in one of the scripts and need your assistance to resolve it.

The error message I received is as follows:

"NullReferenceException: Object reference not set to an instance of an object AICommand.OpenAiUtilInvokeChat (System.String prompt) (at Assets/Editor/OpenAiUtil.cs:52)"

To ensure I followed the correct procedure, I took these steps:

-Downloaded the project.
-Installed the exact version specified in your sample (v2022.2.10).
-Navigated to Edit > Project Settings > AI Command and entered the generated API key. I tried various formats, including with and without the "sk-" prefix and the hyphen.
-Opened the "test" scene included in the project.
-Accessed the windows menu and ran the test prompt, which led to the error message.
-Could you please guide me in rectifying this issue?

I apologize for any inconvenience, and I truly appreciate your efforts in developing this plugin. I admire your work and am grateful for your contributions to the community.

For your reference, here are my system specifications:

  • NVIDIA GTX 3060 Ti
  • 16GB RAM
  • 1TB SSD
  • AMD Ryzen 5 1600 Six-Core Processor
  • Windows 10
  • Thank you in advance for your assistance.

Sincerely,

JPupper

the gpt api requires a paid plan. you likely don't have your account set up for that. try adding this line to the script OpenAiUtil and
image

if it gives you a quota limit reached error you can set up a billing account here
https://platform.openai.com/account/billing/overview

@Severencir thanks for the quick anwer.

I´ve added my credit card and now its working, thank you very much.