Skip to content

Commit

Permalink
Check if systemPrompt is null.
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Lee <[email protected]>
  • Loading branch information
austintlee committed Oct 11, 2023
1 parent e0b85ba commit bdebe65
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ public static String buildSingleStringPrompt(
}

StringBuilder bldr = new StringBuilder();
bldr.append(systemPrompt);
bldr.append(NEWLINE);

if (!Strings.isNullOrEmpty(systemPrompt)) {
bldr.append(systemPrompt);
bldr.append(NEWLINE);
}
if (!Strings.isNullOrEmpty(userInstructions)) {
bldr.append(userInstructions);
bldr.append(NEWLINE);
Expand Down

0 comments on commit bdebe65

Please sign in to comment.