KellanM / OpenAI-Api-Unreal

Integration for the OpenAI Api in Unreal Engine
MIT License
672 stars 150 forks source link

Getting Inject Restart Text at end of Completion #8

Closed jimdinunzio closed 1 year ago

jimdinunzio commented 1 year ago

I am using the chat preset set up and have put the recommended values in the fields. But when I use it the output text includes the restart text at the end. In this case "Human:" is always at the end. Then I have to manually truncate the string to remove it. image

abuelgasimsaadeldin commented 1 year ago

Hi @jimdinunzio,

I've also just recently came across this Plugin and am currently testing it out, my GPT3 settings seem to be slightly different from yours, may I ask what version of the Plugin are you using? In my case, the "Stop sequences" in Make GPT3Settings is an an 'Array of Strings' instead of a 'String' hence why I've added a "Parse into Array" to try and obtain only a single output responses based on my input prompt. PS. Seems to be working fine but please correct me if my knowledge is incorrect. Cheers.

image

jimdinunzio commented 1 year ago

Hi @abuelgasimsaadeldin, I am using v1.4 of the plugin downloaded recently. Mine also has an array (indicated by the pink rectangle grid icon) for the stop sequences. See my revised screen capture. I also added '.' so that I always get a complete sentence. The key issue is with the inject restart text which is critical for the conversation to continue to add context, with Human: and AI: added each time either one says anything as a continuation of the pattern in the Start Sequence. If you don't have that injected text, the AI starts going off topic quickly and hallucinates.

abuelgasimsaadeldin commented 1 year ago

Hi @jimdinunzio, I see! thank you very much for the information, that explains why my AI keeps going off topic and does not retain any memory. Now that the GPT3 is working fine in the unreal engine, curious, have you tried performing ASR and TTS for communicating with a virtual avatar/characters? I am trying to accomplish this task and and am struggling quite a bit, any help, would be highly appreciated.

Best regards, Abu

jimdinunzio commented 1 year ago

Hi this is still happening as of 12/10/22 with current master branch