Chatgpt integration

Assign: Object reference not set to an instance of an object.

not able yo visilise the issue.Please gave me ans

Hey

please share your workflow screenshot and your error

Basically you are trying to assing a variable that is null,

Thats what this error means, you are not getting data in that variable are you are trying to assing a null value, so please debug your process and check those variables

Regards

Hi sir,
Please find the attach screenshot.

Hi @Devendra_Bhardwaj,

Looks like your variable ChatGptInput is not instantiated. Check on Locals panel on your left.

Iā€™m assuming this is the variable of type JObject. So you need to instantiate it.

Just put an assing before you activities or put as default value in your variable panel: ChatGptInput = new JObejct()

Cheers.

Hi @Schirru
I created the variable of jObject.

In the default value, instantiate it. Use new JObject()

Superb @Schirru lots of thank you
But why we need to give default value.

1 Like

Your welcome!

UiPath uses either VB.Net or C#, both of them are Object Oriented Languages. Meaning almost everything you are using is a object, and need to be instantiated or, in a simple term, need to created.

Since you are creating a new object, ChatGptIput as JObject, you first need to create the object (or instantiate it), so you can use it later. Putting as default value is something like a shortcut, but you could also leave the default value empty and use a assing activity at begging of your code with: ChatGptInput = new JObject().

If you can, take some time to study about Object Oriented Programmig, it will be a life changing.

Glad I could help!

1 Like

Screenshot_20230202_013107

Sure @Schirru I was very helpful for me. object oriented programming means c++,or c#.or vba?.

OOP actually is a paradigm, not a language itself. Laguages as Python, C#, VB.Net, C++, Java and many others are used for OOP.

Please explain Fuzzy Selector.