|
|
@ -25,7 +25,7 @@ public interface LangChainChatService {
|
|
|
|
* @param createBaseDTO 知识库对象
|
|
|
|
* @param createBaseDTO 知识库对象
|
|
|
|
* @return 结果
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostExchange(url = "create_knowledge_base", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@PostExchange(url = "/knowledge_base/create_knowledge_base", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
LangChainChatRes createBase(@RequestBody CreateBaseDTO createBaseDTO);
|
|
|
|
LangChainChatRes createBase(@RequestBody CreateBaseDTO createBaseDTO);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -42,7 +42,7 @@ public interface LangChainChatService {
|
|
|
|
* @param docs {"test.txt":[{"page_content":"custom doc","metadata":{},"type":"Document"}]} 固定值
|
|
|
|
* @param docs {"test.txt":[{"page_content":"custom doc","metadata":{},"type":"Document"}]} 固定值
|
|
|
|
* @return 调用的结果
|
|
|
|
* @return 调用的结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostExchange(url = "upload_docs", contentType = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
|
@PostExchange(url = "/knowledge_base/upload_docs", contentType = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
|
LangChainChatRes uploadFile(@RequestPart String knowledge_base_name,
|
|
|
|
LangChainChatRes uploadFile(@RequestPart String knowledge_base_name,
|
|
|
|
@RequestPart MultipartFile files,
|
|
|
|
@RequestPart MultipartFile files,
|
|
|
|
@RequestPart String text_splitter_type,
|
|
|
|
@RequestPart String text_splitter_type,
|
|
|
@ -59,18 +59,15 @@ public interface LangChainChatService {
|
|
|
|
* @param deleteFileDTO 删除的对象
|
|
|
|
* @param deleteFileDTO 删除的对象
|
|
|
|
* @return 返回结果
|
|
|
|
* @return 返回结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostExchange(url = "delete_docs", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@PostExchange(url = "/knowledge_base/delete_docs", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
LangChainChatRes<Object> deleteFile(@RequestBody DeleteFileDTO deleteFileDTO);
|
|
|
|
LangChainChatRes<Object> deleteFile(@RequestBody DeleteFileDTO deleteFileDTO);
|
|
|
|
|
|
|
|
|
|
|
|
@GetExchange(url = "list_files")
|
|
|
|
@GetExchange(url = "/knowledge_base/list_files")
|
|
|
|
LangChainChatRes<List<String>> queryFileList(@RequestParam String knowledge_base_name);
|
|
|
|
LangChainChatRes<List<String>> queryFileList(@RequestParam String knowledge_base_name);
|
|
|
|
|
|
|
|
|
|
|
|
@PostExchange(url = "/delete_knowledge_base", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@PostExchange(url = "/knowledge_base//delete_knowledge_base", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
LangChainChatRes<Object> deleteBase(@RequestBody String knowledge_base_name);
|
|
|
|
LangChainChatRes<Object> deleteBase(@RequestBody String knowledge_base_name);
|
|
|
|
|
|
|
|
|
|
|
|
@PostExchange(url = "/comDictionary/queryByType", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
|
|
|
R<?> findDictionaryListByType();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostExchange(url = "/chat/knowledge_base_chat", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@PostExchange(url = "/chat/knowledge_base_chat", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
ChatResDTO chat(@RequestBody ChatReqDTO chatReq);
|
|
|
|
ChatResDTO chat(@RequestBody ChatReqDTO chatReq);
|
|
|
|