(improvement)(chat) Modify the default URL and model of zhipu, and enable search support for qwen. (#1578)

This commit is contained in:
lexluo09
2024-08-17 23:12:48 +08:00
committed by GitHub
parent 898c7100ba
commit 115cf19078
8 changed files with 40 additions and 17 deletions

View File

@@ -13,7 +13,6 @@ import org.springframework.stereotype.Service;
public class DashscopeModelFactory implements ModelFactory, InitializingBean {
public static final String PROVIDER = "DASHSCOPE";
public static final String DEFAULT_BASE_URL = "https://dashscope.aliyuncs.com/api/v1";
public static final String DEFAULT_COMPATIBLE_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1";
@Override
public ChatLanguageModel createChatModel(ChatModelConfig modelConfig) {
@@ -24,6 +23,7 @@ public class DashscopeModelFactory implements ModelFactory, InitializingBean {
.temperature(modelConfig.getTemperature() == null ? 0L :
modelConfig.getTemperature().floatValue())
.topP(modelConfig.getTopP())
.enableSearch(modelConfig.getEnableSearch())
.build();
}