还原
This commit is contained in:
parent
321047acc9
commit
8abb4879b7
@ -118,21 +118,9 @@ public class ConversationServiceImpl implements ConversationService {
|
||||
|
||||
@Override
|
||||
public ChatRespVO chat(ChatReqVO chatReqVO) {
|
||||
|
||||
// 模型推理 - 模型 - 可能选择向量知识库库,选择向量知识库时先查询知识库
|
||||
if(chatReqVO.getKnowledgeId()!= null){
|
||||
|
||||
}
|
||||
//2.08 修改推理接口,先查询知识库,知识库查询为空则继续查询
|
||||
if(chatReqVO.getSystemPrompt() == null || chatReqVO.getSystemPrompt().equals("")){
|
||||
if(chatReqVO.getApplicationId() != null){
|
||||
ApplicationRespVO application = applicationService.getApplication(chatReqVO.getApplicationId());
|
||||
// 获取知识库ID
|
||||
if (application.getModelServiceId() != null){
|
||||
// 查询知识库,知识库查询结果不为空直接返回
|
||||
|
||||
}
|
||||
|
||||
List<String> messageHistoryList = stringRedisTemplate.opsForList().range(CHAT_HIStORY_REDIS_KEY + ":" + chatReqVO.getUuid(), 0, -1);
|
||||
if (CollectionUtils.isEmpty(messageHistoryList)){
|
||||
application.setChatCount(application.getChatCount() + 1);
|
||||
@ -282,7 +270,7 @@ public class ConversationServiceImpl implements ConversationService {
|
||||
messages.add(message);
|
||||
ModelCompletionsReqVO modelCompletionsReqVO = new ModelCompletionsReqVO();
|
||||
modelCompletionsReqVO.setMessages(messages);
|
||||
// TODO 先传固定的内容 后期和后端调通直接修改成 model 1.23 已修改
|
||||
// TODO 先传固定的内容 后期和后端调通直接修改成 model 1.23 已修改
|
||||
modelCompletionsReqVO.setModel(model);
|
||||
ModelCompletionsRespVO modelCompletionsRespVO = modelService.modelPrivateCompletions(new HashMap<>(),modelCompletionsReqVO);
|
||||
if (modelCompletionsRespVO == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user