[improvement](chat) remove Python service and rewrite it using a Java project (#428)

This commit is contained in:
lexluo09
2023-11-27 17:40:10 +08:00
committed by GitHub
parent c36082476f
commit 41e585324d
23 changed files with 16 additions and 613 deletions

View File

@@ -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

View File

@@ -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>

View File

@@ -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();
}
}

View File

@@ -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

View File

@@ -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