|
|
@@ -40,6 +40,7 @@ public class ChatGlm3Controller extends BaseController {
|
|
|
@PostMapping()
|
|
|
public SseEmitter chat(@RequestBody List<Message> messages) {
|
|
|
String openaiApiHost = environment.getProperty("chat-glm3.host");
|
|
|
+ Integer maxToken = environment.getProperty("chat-glm3.max-token", Integer.class);
|
|
|
SseEmitterUtf8 sseEmitter = new SseEmitterUtf8(-1L);
|
|
|
|
|
|
SseStreamListener listener = new SseStreamListener(sseEmitter);
|
|
|
@@ -51,8 +52,7 @@ public class ChatGlm3Controller extends BaseController {
|
|
|
.topP(0.8)
|
|
|
.presencePenalty(0)
|
|
|
.frequencyPenalty(0)
|
|
|
- .maxTokens(100)
|
|
|
- .user("tom")
|
|
|
+ .maxTokens(maxToken)
|
|
|
.build();
|
|
|
|
|
|
// 不需要代理的话,注销此行
|