mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 22:46:49 +00:00
[improvement](chat) remove Python service and rewrite it using a Java project (#428)
This commit is contained in:
@@ -19,8 +19,8 @@ com.tencent.supersonic.chat.api.component.SemanticCorrector=\
|
||||
com.tencent.supersonic.chat.corrector.GroupByCorrector, \
|
||||
com.tencent.supersonic.chat.corrector.HavingCorrector
|
||||
|
||||
com.tencent.supersonic.chat.llm.LLMInterpreter=\
|
||||
com.tencent.supersonic.chat.llm.HttpLLMInterpreter
|
||||
com.tencent.supersonic.chat.parser.LLMInterpreter=\
|
||||
com.tencent.supersonic.chat.parser.HttpLLMInterpreter
|
||||
|
||||
com.tencent.supersonic.chat.api.component.SemanticInterpreter=\
|
||||
com.tencent.supersonic.knowledge.semantic.RemoteSemanticInterpreter
|
||||
|
||||
@@ -96,16 +96,6 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!--langchain4j-->
|
||||
<dependency>
|
||||
<groupId>dev.langchain4j</groupId>
|
||||
<artifactId>langchain4j-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>dev.langchain4j</groupId>
|
||||
<artifactId>langchain4j-embeddings-all-minilm-l6-v2</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.tencent.supersonic.config;
|
||||
|
||||
import dev.langchain4j.model.embedding.AllMiniLmL6V2EmbeddingModel;
|
||||
import dev.langchain4j.model.embedding.EmbeddingModel;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class LangChain4jConfig {
|
||||
|
||||
@Bean
|
||||
EmbeddingModel embeddingModel() {
|
||||
return new AllMiniLmL6V2EmbeddingModel();
|
||||
}
|
||||
}
|
||||
@@ -21,8 +21,8 @@ com.tencent.supersonic.chat.api.component.SemanticCorrector=\
|
||||
com.tencent.supersonic.chat.corrector.HavingCorrector, \
|
||||
com.tencent.supersonic.chat.corrector.FromCorrector
|
||||
|
||||
com.tencent.supersonic.chat.llm.LLMInterpreter=\
|
||||
com.tencent.supersonic.chat.llm.HttpLLMInterpreter
|
||||
com.tencent.supersonic.chat.parser.LLMInterpreter=\
|
||||
com.tencent.supersonic.chat.parser.HttpLLMInterpreter
|
||||
|
||||
com.tencent.supersonic.chat.api.component.SemanticInterpreter=\
|
||||
com.tencent.supersonic.knowledge.semantic.LocalSemanticInterpreter
|
||||
@@ -49,6 +49,4 @@ com.tencent.supersonic.chat.responder.parse.ParseResponder=\
|
||||
|
||||
com.tencent.supersonic.chat.responder.execute.ExecuteResponder=\
|
||||
com.tencent.supersonic.chat.responder.execute.EntityInfoExecuteResponder, \
|
||||
com.tencent.supersonic.chat.responder.execute.SimilarMetricExecuteResponder
|
||||
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=dev.langchain4j.LangChain4jAutoConfiguration
|
||||
com.tencent.supersonic.chat.responder.execute.SimilarMetricExecuteResponder
|
||||
@@ -39,19 +39,4 @@ llm:
|
||||
embedding:
|
||||
url: http://127.0.0.1:9092
|
||||
functionCall:
|
||||
url: http://127.0.0.1:9092
|
||||
|
||||
|
||||
langchain4j:
|
||||
chat-model:
|
||||
provider: open_ai
|
||||
openai:
|
||||
api-key: api_key
|
||||
model-name: gpt-3.5-turbo
|
||||
temperature: 0.0
|
||||
timeout: PT60S
|
||||
|
||||
logging:
|
||||
level:
|
||||
dev.langchain4j: DEBUG
|
||||
dev.ai4j.openai4j: DEBUG
|
||||
url: http://127.0.0.1:9092
|
||||
Reference in New Issue
Block a user