@ -52,9 +52,12 @@ public class OpenAiConfigProperties {
private int basicMaxCount = 50;
/** System Rules Limit */
private String systemRule = "是与AI助手的对话。助手乐于助人,富有创造力,聪明限制每次回答在120字以内不得超过120字。";
private String systemRule = "是与AI助手的对话。助手乐于助人,富有创造力,聪明。";
/** Context Window Max */
private String contextMessageMaxCount = "14";
/** The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens). */
private Integer completionMaxTokens = 300;
}
@ -66,7 +66,7 @@ public class AiUtil {
.n(1)
.frequencyPenalty(1.0)
.presencePenalty(1.0)
.maxTokens(160)
.maxTokens(openAiConfigProperties.getCompletionMaxTokens())
.topP(0.8)
.user(SecurityUtils.getCasUser().getId())
.build();