Commit 2c5b14b
FIX ISSUE:The parameter
在依赖的agentscope中OpenAIChatFormatter.java第107-110行,代码同时将maxTokens设置到了OpenAIRequest的maxCompletionTokens和maxTokens两个字段中,这导致了API返回400错误,因为这两个参数是互斥的。根据OpenAI API文档,max_completion_tokens是较新的参数,用于替代max_tokens,所以应该只设置其中一个。
Co-authored-by: daofeng <xujingfeng95@gmail.com>max_tokens specified in the request are not valid: max_tokens and max_completion_tokens cannot be set at the same time;Refactor maxTokens assignment in AbstractLlmService (#177)1 parent 8b67c1d commit 2c5b14b
File tree
1 file changed
+1
-1
lines changed- himarket-server/src/main/java/com/alibaba/himarket/service/hichat/service
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
0 commit comments