mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 06:27:21 +00:00
(improvement)(headless) Add support for the Ollama provider in the frontend and optimize the code (#1270)
This commit is contained in:
@@ -3,8 +3,8 @@ package com.tencent.supersonic.headless.chat.parser.llm;
|
||||
import com.tencent.supersonic.common.config.LLMConfig;
|
||||
import com.tencent.supersonic.headless.chat.query.llm.s2sql.LLMReq;
|
||||
import com.tencent.supersonic.headless.chat.query.llm.s2sql.LLMResp;
|
||||
import com.tencent.supersonic.common.util.S2ChatModelProvider;
|
||||
import dev.langchain4j.model.chat.ChatLanguageModel;
|
||||
import dev.langchain4j.model.provider.ChatLanguageModelProvider;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
@@ -24,7 +24,7 @@ public abstract class SqlGenStrategy implements InitializingBean {
|
||||
protected PromptHelper promptHelper;
|
||||
|
||||
protected ChatLanguageModel getChatLanguageModel(LLMConfig llmConfig) {
|
||||
return S2ChatModelProvider.provide(llmConfig);
|
||||
return ChatLanguageModelProvider.provide(llmConfig);
|
||||
}
|
||||
|
||||
abstract LLMResp generate(LLMReq llmReq);
|
||||
|
||||
Reference in New Issue
Block a user