mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-14 05:33:42 +08:00
add clear api
This commit is contained in:
@@ -133,4 +133,9 @@ public class AiController {
|
|||||||
}
|
}
|
||||||
departmentRepository.deleteByName(name);
|
departmentRepository.deleteByName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/chat/refresh")
|
||||||
|
void createNewConversation(Principal principal) {
|
||||||
|
aiChatService.evictChatMemory(principal.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,4 +53,11 @@ public class AiChatService {
|
|||||||
AiLlmConfig aiLlmConfig = precedenceLlmBy.orElseThrow(() -> new BusinessException("没有开启的大模型"));
|
AiLlmConfig aiLlmConfig = precedenceLlmBy.orElseThrow(() -> new BusinessException("没有开启的大模型"));
|
||||||
return aiLlmConfig.getCode();
|
return aiLlmConfig.getCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void evictChatMemory(String sessionIdentifier) {
|
||||||
|
deepSeekChatAssistant.evictChatMemory(sessionIdentifier);
|
||||||
|
zhiPuChatAssistant.evictChatMemory(sessionIdentifier);
|
||||||
|
zhiPuToolAssistant.evictChatMemory(sessionIdentifier);
|
||||||
|
deepSeekToolAssistant.evictChatMemory(sessionIdentifier);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user