mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +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)
|
.messages(messageList)
|
||||||
.maxTokens(chatOptions.getMaxTokens())
|
.maxTokens(chatOptions.getMaxTokens())
|
||||||
.resultFormat(QwenParam.ResultFormat.MESSAGE)
|
.resultFormat(QwenParam.ResultFormat.MESSAGE)
|
||||||
.topP(Double.valueOf(chatOptions.getTopP()))
|
.topP(chatOptions.getTopP() == null ? null : Double.valueOf(chatOptions.getTopP()))
|
||||||
.topK(chatOptions.getTopK())
|
.topK(chatOptions.getTopK())
|
||||||
.temperature(chatOptions.getTemperature())
|
.temperature(chatOptions.getTemperature())
|
||||||
// 控制流式输出模式,即后面的内容会包含已经输出的内容;设置为True,将开启增量输出模式,后面的输出不会包含已经输出的内容,您需要自行拼接整体输出
|
// 控制流式输出模式,即后面的内容会包含已经输出的内容;设置为True,将开启增量输出模式,后面的输出不会包含已经输出的内容,您需要自行拼接整体输出
|
||||||
|
@ -43,25 +43,14 @@ public class QianWenOptions implements ChatOptions {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
|
||||||
// public void setTemperature(Float temperature) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void setTopP(Float topP) {
|
|
||||||
// this.topP = topP;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getTopK() {
|
public Integer getTopK() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
public Float getTopP() {
|
||||||
// public void setTopK(Integer topK) {
|
return topP;
|
||||||
//
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Accessors
|
@Accessors
|
||||||
|
Loading…
Reference in New Issue
Block a user