Hello everyone, I'm making a discord bot that allows you to clone any person that you want and it will allow you to talk to them as if you are talking to the person you chose through discord slash commands. I'm working on making it save the past 5 interactions it had with a User in a certain Guild but when I implemented this, it started to generate empty strings which would make JDA error because the discord bot cant send an empty string. Can someone look into this for me? Thanks sm
CompletionRequest completionRequest = CompletionRequest.builder()
.prompt(String.format("As an expert in imitating human conversations, " +
"please respond as %s, the character/personality you are going to clone, " +
"to the following input:%s. %s",
SQLManager.getCharacter(event.getGuild()),
prompt,
message != null ? containsPastMessage : ""))
.model("text-davinci-003")
.maxTokens(200)
.temperature(.8)
.stop(Arrays.asList("SAUHNASDFUIJBDNIHASJFBIHDASJKBFGIHSDGBVSHDfv"))
.frequencyPenalty(2.0)
.presencePenalty(2.0)
.build();
//Will be empty SOMETIMES :(
String response = completionResult.getChoices().get(0).getText();