keijiro / aishader Goto Github PK
View Code? Open in Web Editor NEWChatGPT-powered shader generator for Unity
ChatGPT-powered shader generator for Unity
Hi Keijiro, nice tool!
I'm trying to test it but I'm getting the following error after clicking the Generate button:
NullReferenceException: Object reference not set to an instance of an object
AIShader.OpenAIUtil.InvokeChat (System.String prompt) (at Assets/Editor/OpenAIUtil.cs:48)
AIShader.AIShaderImporterEditor.Regenerate () (at Assets/Editor/AIShaderImporterEditor.cs:28)
AIShader.AIShaderImporterEditor.OnInspectorGUI () (at Assets/Editor/AIShaderImporterEditor.cs:51)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass71_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <d18341e808be4529a1a4512a7e51ab3d>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I made sure to set the API token. Any thoughts?
Kind regards,
Diego Guisasola
First debug message: Rebuilding Library because the asset database could not be found!
Exception when I click "Generate" on the example:
NullReferenceException: Object reference not set to an instance of an object
AIShader.OpenAIUtil.InvokeChat (System.String prompt) (at Assets/Editor/OpenAIUtil.cs:48)
AIShader.AIShaderImporterEditor.Regenerate () (at Assets/Editor/AIShaderImporterEditor.cs:28)
AIShader.AIShaderImporterEditor.OnInspectorGUI () (at Assets/Editor/AIShaderImporterEditor.cs:51)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass71_0.b__0 () (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I wrote prompt and I clicked generate and gave me this error.
NullReferenceException: Object reference not set to an instance of an object
AIShader.OpenAIUtil.InvokeChat (System.String prompt) (at Assets/Scenes/AIShader-main/Assets/Editor/OpenAIUtil.cs:48)
AIShader.AIShaderImporterEditor.Regenerate () (at Assets/Scenes/AIShader-main/Assets/Editor/AIShaderImporterEditor.cs:28)
AIShader.AIShaderImporterEditor.OnInspectorGUI () (at Assets/Scenes/AIShader-main/Assets/Editor/AIShaderImporterEditor.cs:51)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass71_0.b__0 () (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
this code reference "return data.choices[0].message.content;"
How can I solve this problem?
I get 'You exceeded your current quota, please check your plan and billing details' error in OpenAIUtil.cs:46
I've got OpenAI+ plan. What am I missing? I've just subscribed. All quotas are at 0.
NullReferenceException: Object reference not set to an instance of an object
AIShader.OpenAIUtil.InvokeChat (System.String prompt) (at Assets/Editor/OpenAIUtil.cs:48)
AIShader.AIShaderImporterEditor.Regenerate () (at Assets/Editor/AIShaderImporterEditor.cs:28)
AIShader.AIShaderImporterEditor.OnInspectorGUI () (at Assets/Editor/AIShaderImporterEditor.cs:51)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass71_0.b__0 () (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
How can I Fix this?
\OpenAIUtil.cs(28,59): error CS1503: Argument 3: cannot convert from 'string' to 'byte[]'
OpenAIUtil.cs(28,28): error CS1503: Argument 2: cannot convert from 'string' to 'System.Collections.Generic.List<UnityEngine.Networking.IMultipartFormSection>'
I have been experimenting with using gpt4 in programming tasks and I've found that if you ask it to pretend it's a compiler and imagine what would happen when it runs it will return good code (if it is in the right mood!)
Using models and instances together is very powerful, you can have gpt4 check its own work, but the tokens add up quickly.
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
I didn't changed anything other than my API key. I used same version. I am %100 sure i have a ChatGPT Plus membership.
NullReferenceException: Object reference not set to an instance of an object
AIShader.OpenAIUtil.InvokeChat (System.String prompt) (at Assets/Editor/OpenAIUtil.cs:48)
AIShader.AIShaderImporterEditor.Regenerate () (at Assets/Editor/AIShaderImporterEditor.cs:28)
AIShader.AIShaderImporterEditor.OnInspectorGUI () (at Assets/Editor/AIShaderImporterEditor.cs:51)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass71_0.b__0 () (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.