mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-02-17 01:30:33 +08:00
【解决todo】通义千问增加 model 和 temperature
This commit is contained in:
parent
89db7883e3
commit
3fdb8fd5c3
@ -63,6 +63,8 @@ public class YudaoAiAutoConfiguration {
|
||||
YudaoAiProperties.QianWenProperties qianWenProperties = yudaoAiProperties.getQianwen();
|
||||
// 转换配置
|
||||
QianWenOptions qianWenOptions = new QianWenOptions();
|
||||
qianWenOptions.setModel(qianWenProperties.getModel().getModel());
|
||||
qianWenOptions.setTemperature(qianWenProperties.getTemperature());
|
||||
// qianWenOptions.setTopK(qianWenProperties.getTopK()); TODO 芋艿:后续弄
|
||||
qianWenOptions.setTopP(qianWenProperties.getTopP());
|
||||
qianWenOptions.setMaxTokens(qianWenProperties.getMaxTokens());
|
||||
|
@ -6,8 +6,6 @@ import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
// TODO @fan:增加一个 model 参数
|
||||
// TODO @fan:增加一个 Temperature 参数
|
||||
/**
|
||||
* 阿里云 千问 属性
|
||||
*
|
||||
@ -34,6 +32,14 @@ public class QianWenOptions implements ChatOptions {
|
||||
* 用于限制模型生成token的数量,max_tokens设置的是生成上限,并不表示一定会生成这么多的token数量。其中qwen1.5-14b-chat、qwen1.5-7b-chat、qwen-14b-chat和qwen-7b-chat最大值和默认值均为1500,qwen-1.8b-chat、qwen-1.8b-longcontext-chat和qwen-72b-chat最大值和默认值均为2000
|
||||
*/
|
||||
private Integer maxTokens = 1500;
|
||||
/**
|
||||
* 模型
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* temperature
|
||||
*/
|
||||
private Float temperature;
|
||||
|
||||
//
|
||||
// 适配 ChatOptions
|
||||
|
Loading…
Reference in New Issue
Block a user