Commit c811f3a4c21c40be211ed8b7c9dedc34f18dacc7

Authored by cherishsince
1 parent e4bb7262

【优化】抽离 maxTokens 作为公共参数

yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiProperties.java
@@ -37,6 +37,10 @@ public class YudaoAiProperties { @@ -37,6 +37,10 @@ public class YudaoAiProperties {
37 private Float topP; 37 private Float topP;
38 38
39 private Integer topK; 39 private Integer topK;
  40 + /**
  41 + * 用于限制模型生成token的数量,max_tokens设置的是生成上限,并不表示一定会生成这么多的token数量
  42 + */
  43 + private Integer maxTokens;
40 } 44 }
41 45
42 @Data 46 @Data
@@ -48,10 +52,6 @@ public class YudaoAiProperties { @@ -48,10 +52,6 @@ public class YudaoAiProperties {
48 */ 52 */
49 private String apiKey; 53 private String apiKey;
50 /** 54 /**
51 - * 用于限制模型生成token的数量,max_tokens设置的是生成上限,并不表示一定会生成这么多的token数量  
52 - */  
53 - private Integer maxTokens;  
54 - /**  
55 * model 55 * model
56 */ 56 */
57 private YiYanChatModel model; 57 private YiYanChatModel model;