|
|
|
@ -2,16 +2,32 @@ package com.supervision.chat.client;
|
|
|
|
|
|
|
|
|
|
import com.supervision.chat.client.dto.CreateBaseDTO;
|
|
|
|
|
import com.supervision.chat.client.dto.LangChainChatRes;
|
|
|
|
|
import org.springframework.core.io.Resource;
|
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestPart;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
import org.springframework.web.service.annotation.HttpExchange;
|
|
|
|
|
import org.springframework.web.service.annotation.PostExchange;
|
|
|
|
|
|
|
|
|
|
@HttpExchange
|
|
|
|
|
public interface LangChainChatService {
|
|
|
|
|
|
|
|
|
|
@PostExchange(url = "create_knowledge_base", contentType = "application/json")
|
|
|
|
|
@PostExchange(url = "create_knowledge_base", contentType = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
LangChainChatRes chat(@RequestBody CreateBaseDTO createBaseDTO);
|
|
|
|
|
|
|
|
|
|
@PostExchange(url = "upload_docs", contentType = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
|
|
void uploadFile(@RequestPart String knowledge_base_name,
|
|
|
|
|
@RequestPart Resource files,
|
|
|
|
|
@RequestPart String to_vector_store,
|
|
|
|
|
@RequestPart String override,
|
|
|
|
|
@RequestPart String not_refresh_vs_cache,
|
|
|
|
|
@RequestPart Integer chunk_size,
|
|
|
|
|
@RequestPart Integer chunk_overlap,
|
|
|
|
|
@RequestPart String zh_title_enhance,
|
|
|
|
|
@RequestPart String text_splitter_type,
|
|
|
|
|
@RequestPart String docs);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|