How to make Custom Dataset for ChatGPT

Hi,so I was trying to make NPC that can talk either with player or other NPCs by using ChatGPT and it kinda work after using OpenAI plugin,but the NPCs still didn’t understand their enivorenment and sometimes talk things outside the scope of the game.

and to fix it,i’m thinking about making custom dataset for the NPCs

is there anyone here know how to make custom dataset for chatgpt and linking it with Unreal Engine?thanks before

I think your best bet here is to add a custom hidden prompt to tell GPT to act like the NPC should act. Something like “Act like a NPC in a game about X, doing Y, and your character traits are Z. The player asks: TEXT”.

In programming terms it could look like

FString AskGPT(const FString& PlayerText)
{
    FString FinalText = FString::Printf(TEXT("Act like a NPC in a heroic-fantasy game. You are a blacksmith and you love waffles. The player asks: %s"), *PlayerText);

    return OpenAIPlugin::Prompt(FinalText);
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.