mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
【优化】处理 QianWen topP 为空情况
This commit is contained in:
parent
a482876113
commit
e39513c6b2
@ -106,7 +106,7 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient {
|
||||
.messages(messageList)
|
||||
.maxTokens(chatOptions.getMaxTokens())
|
||||
.resultFormat(QwenParam.ResultFormat.MESSAGE)
|
||||
.topP(Double.valueOf(chatOptions.getTopP()))
|
||||
.topP(chatOptions.getTopP() == null ? null : Double.valueOf(chatOptions.getTopP()))
|
||||
.topK(chatOptions.getTopK())
|
||||
.temperature(chatOptions.getTemperature())
|
||||
// 控制流式输出模式,即后面的内容会包含已经输出的内容;设置为True,将开启增量输出模式,后面的输出不会包含已经输出的内容,您需要自行拼接整体输出
|
||||
|
@ -43,25 +43,14 @@ public class QianWenOptions implements ChatOptions {
|
||||
return null;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void setTemperature(Float temperature) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void setTopP(Float topP) {
|
||||
// this.topP = topP;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public Integer getTopK() {
|
||||
return null;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void setTopK(Integer topK) {
|
||||
//
|
||||
// }
|
||||
public Float getTopP() {
|
||||
return topP;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Accessors
|
||||
|
Loading…
Reference in New Issue
Block a user