mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-21 14:14:19 +08:00
(improvement)(chat) Modify the default URL and model of zhipu, and enable search support for qwen. (#1578)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package dev.langchain4j.provider;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.EmbeddingStoreConfig;
|
||||
import dev.langchain4j.store.embedding.EmbeddingStore;
|
||||
|
||||
public interface EmbeddingStoreFactory {
|
||||
EmbeddingStore createEmbeddingStore(EmbeddingStoreConfig config);
|
||||
}
|
||||
@@ -12,8 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class ZhipuModelFactory implements ModelFactory, InitializingBean {
|
||||
public static final String PROVIDER = "ZHIPU";
|
||||
public static final String DEFAULT_BASE_URL = "https://open.bigmodel.cn/api/paas/v4";
|
||||
public static final String DEFAULT_EMBEDDING_BASE_URL = "https://open.bigmodel.cn/";
|
||||
public static final String DEFAULT_BASE_URL = "https://open.bigmodel.cn/";
|
||||
|
||||
@Override
|
||||
public ChatLanguageModel createChatModel(ChatModelConfig modelConfig) {
|
||||
|
||||
Reference in New Issue
Block a user