|
|
@@ -114,6 +114,12 @@ public class AiService {
|
|
|
return null;
|
|
|
}
|
|
|
AgentProperties agentProperties = buildAgentProperties();
|
|
|
+ chatConfig.setTimeout(Duration.ofSeconds(agentProperties.getTimeout()));
|
|
|
+ chatConfig.addDefaultOption("temperature", agentProperties.getTemperature());
|
|
|
+ chatConfig.addDefaultOption("enable_thinking", agentProperties.isEnable_thinking());
|
|
|
+ chatConfig.addDefaultOption("top_p", agentProperties.getTop_p());
|
|
|
+ chatConfig.addDefaultOption("frequency_penalty", agentProperties.getFrequency_penalty());
|
|
|
+ chatConfig.addDefaultOption("presence_penalty", agentProperties.getPresence_penalty());
|
|
|
ChatModel aiChatModel = ChatModel.of(chatConfig).build();
|
|
|
return AgentRuntime.builder()
|
|
|
.chatModel(aiChatModel)
|
|
|
@@ -273,6 +279,6 @@ public class AiService {
|
|
|
String personName = personNames.getFirst();
|
|
|
List<String> list = qs.stream().map(q -> StrUtil.format(q, personName)).collect(Collectors.toList());
|
|
|
Collections.shuffle(list);
|
|
|
- return list.subList(0,3);
|
|
|
+ return list.subList(0, 3);
|
|
|
}
|
|
|
}
|