KellanM / OpenAI-Api-Unreal

Integration for the OpenAI Api in Unreal Engine
MIT License
649 stars 143 forks source link

Error: Json Value of type 'Null' used as a 'Number' #31

Closed Sissidark closed 1 year ago

Sissidark commented 1 year ago

LogJson: Warning: Field index was not found. LogJson: Error: Json Value of type 'Null' used as a 'Number'.

image image image

So what went wrong? At the same time, if I want to set it as an npc in the game, I want to know how I can customize the content of the role to give him a background setting.

KellanM commented 1 year ago

You're close! Connect the execution pin labeled "Finished" from the OpenAICallChat node to the conditional branch node.

KellanM commented 1 year ago

to give your NPC background information, manually add one element to your ChatLog array of type "system" and set the message to whatever you want the NPC to do. (i.e. you are a friendly NPC tasked with helping the player learn about x).

Sissidark commented 1 year ago

to give your NPC background information, manually add one element to your ChatLog array of type "system" and set the message to whatever you want the NPC to do. (i.e. you are a friendly NPC tasked with helping the player learn about x).

I tried to add it manually, but the AI ​​answer seems to be the default setting? Where did I go wrong?

image

image