|
|
|
@ -11,6 +11,8 @@ import org.springframework.web.service.annotation.GetExchange;
|
|
|
|
|
import org.springframework.web.service.annotation.HttpExchange;
|
|
|
|
|
import org.springframework.web.service.annotation.PostExchange;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@HttpExchange
|
|
|
|
|
public interface LangChainChatService {
|
|
|
|
|
|
|
|
|
@ -20,7 +22,7 @@ public interface LangChainChatService {
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@PostExchange(url = "create_knowledge_base", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
LangChainChatRes createBase(@RequestBody CreateBaseDTO createBaseDTO);
|
|
|
|
|
LangChainChatRes<Object> createBase(@RequestBody CreateBaseDTO createBaseDTO);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 上传文档接口
|
|
|
|
@ -37,7 +39,7 @@ public interface LangChainChatService {
|
|
|
|
|
* @return 调用的结果
|
|
|
|
|
*/
|
|
|
|
|
@PostExchange(url = "upload_docs", contentType = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
|
|
LangChainChatRes uploadFile(@RequestPart String knowledge_base_name,
|
|
|
|
|
LangChainChatRes<Object> uploadFile(@RequestPart String knowledge_base_name,
|
|
|
|
|
@RequestPart MultipartFile files,
|
|
|
|
|
@RequestPart String text_splitter_type,
|
|
|
|
|
@RequestPart Boolean to_vector_store,
|
|
|
|
@ -54,13 +56,13 @@ public interface LangChainChatService {
|
|
|
|
|
* @return 返回结果
|
|
|
|
|
*/
|
|
|
|
|
@PostExchange(url = "delete_docs", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
LangChainChatRes deleteFile(@RequestBody DeleteFileDTO deleteFileDTO);
|
|
|
|
|
LangChainChatRes<Object> deleteFile(@RequestBody DeleteFileDTO deleteFileDTO);
|
|
|
|
|
|
|
|
|
|
@GetExchange(url = "list_files")
|
|
|
|
|
LangChainChatRes 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)
|
|
|
|
|
LangChainChatRes deleteBase(@RequestBody String knowledge_base_name);
|
|
|
|
|
LangChainChatRes<Object> deleteBase(@RequestBody String knowledge_base_name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|