Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in console #1

Closed
Weimmer opened this issue Mar 6, 2023 · 9 comments
Closed

Error in console #1

Weimmer opened this issue Mar 6, 2023 · 9 comments
Assignees
Labels
question Further information is requested

Comments

@Weimmer
Copy link

Weimmer commented Mar 6, 2023

Hi Keijiro,

it is a very cool test, that's why I grab as soon as I see it, but when I click the generate button on the AIShader, it has error in the console:

NullReferenceException: Object reference not set to an instance of an object
AIShader.AIShaderImporterEditor.Regenerate () (at Assets/Editor/AIShaderImporterEditor.cs:55)
_cached.stringValue = response.choices[0].message.content;

Maybe I missed some setting? I have already pasted my chatgpt api key, where it should to be.

Best regards
Weimmer

@keijiro keijiro self-assigned this Mar 7, 2023
@keijiro keijiro added the question Further information is requested label Mar 7, 2023
@keijiro
Copy link
Owner

keijiro commented Mar 7, 2023

Could you check if your API key works properly for the chat completion API? You can test it with curl like the following:

curl https://api.openai.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
  "model": "gpt-3.5-turbo",
  "messages": [{"role": "user", "content": "Hello!"}]
}'

@Da-bass-man
Copy link

I'm having the same issue and i tested the curl you got here and got just got errors
where would i need to run this i would assume cmd correct?

@keijiro
Copy link
Owner

keijiro commented Mar 7, 2023

@Da-bass-man Please copy-paste the errors.

(I also recommend your billing status if your free trial period has been expired.)

@Da-bass-man
Copy link

Ahh you know that might be it looks like my credits expired

@Weimmer
Copy link
Author

Weimmer commented Mar 7, 2023

curl https://api.openai.com/v1/chat/completions
-H 'Content-Type: application/json'
-H 'Authorization: Bearer YOUR_API_KEY'
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]
}'

Thanks for reply, I have tried and done some research, it seems I need a ChatGPT plus, is that true?

@keijiro
Copy link
Owner

keijiro commented Mar 7, 2023

No. You only need ChatGPT API access.

https://openai.com/blog/introducing-chatgpt-and-whisper-apis

@Weimmer
Copy link
Author

Weimmer commented Mar 7, 2023

No. You only need ChatGPT API access.

https://openai.com/blog/introducing-chatgpt-and-whisper-apis

I think I got it, I have to add a payment method in my account, otherwise it will get the error like above. Thanks, it is really cool :)

@keijiro keijiro closed this as completed Mar 7, 2023
@keijiro
Copy link
Owner

keijiro commented Mar 7, 2023

Yes, it needs payment settings if your free trial period has been ended.

@Matrixx123456
Copy link

Hi Keijiro,

it is a very cool test, that's why I grab as soon as I see it, but when I click the generate button on the AIShader, it has error in the console:

NullReferenceException: Object reference not set to an instance of an object AIShader.AIShaderImporterEditor.Regenerate () (at Assets/Editor/AIShaderImporterEditor.cs:55) _cached.stringValue = response.choices[0].message.content;

Maybe I missed some setting? I have already pasted my chatgpt api key, where it should to be.

Best regards Weimmer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants