|
|
|
@ -25,7 +25,6 @@ public class MaxKbImpl {
|
|
|
|
|
public static String uploadQA(String authCode, String zskId, String uploadFile) {
|
|
|
|
|
//知识库url上传地址
|
|
|
|
|
String qaUrl = baseUrl + "/api/dataset/" + zskId + "/document/qa";
|
|
|
|
|
//使用hutool工具箱里面的httpPost功能,向指定的接口发起上传文件的请求,在Header中携带参数authCode
|
|
|
|
|
HttpResponse response = HttpRequest.post(qaUrl)
|
|
|
|
|
.header("Accept", "application/json, text/plain, */*")
|
|
|
|
|
.header("Accept-Encoding", "gzip,deflate")
|
|
|
|
@ -56,7 +55,6 @@ public class MaxKbImpl {
|
|
|
|
|
public static JSONObject uploadDocumentSplit(String authCode, String uploadFile) {
|
|
|
|
|
//知识库url上传地址
|
|
|
|
|
String qaUrl = baseUrl + "/api/dataset/document/split";
|
|
|
|
|
//使用hutool工具箱里面的httpPost功能,向指定的接口发起上传文件的请求,在Header中携带参数authCode
|
|
|
|
|
HttpResponse response = HttpRequest.post(qaUrl)
|
|
|
|
|
.header("Accept", "application/json, text/plain, */*")
|
|
|
|
|
.header("Accept-Encoding", "gzip,deflate")
|
|
|
|
|