main
黄海 7 months ago
parent 9e4c8c0bc9
commit 7b1b5950fe

@ -151,14 +151,14 @@ public class MaxKbImpl {
}
/**
*
*
*
* @param zskId id
* @param modelId id
* @param documentId id
* @return
*/
public static JSONObject genQuestion(String zskId, String modelId, String documentId) {
public static JSONObject manualQuestion(String zskId, String modelId, String documentId) {
String authCode = MaxKbImpl.getAuthorization();
String url = baseUrl + "/api/dataset/" + zskId + "/document/batch_generate_related";
JSONObject jo = new JSONObject();

@ -126,7 +126,7 @@ public class MaxKbService {
* @param documentId Id
* @return
*/
public JSONObject genQuestion(String zskName, String modelName, String documentId) throws InterruptedException {
public JSONObject manualQuestion(String zskName, String modelName, String documentId) throws InterruptedException {
//等待模型生成问题完毕
while (true) {
boolean finish = mm.autoIndexed(documentId);
@ -136,6 +136,6 @@ public class MaxKbService {
Thread.sleep(500);
System.out.println(CommonUtil.getCurrentTime() + " 正在等待模型生成问题完毕...");
}
return MaxKbImpl.genQuestion(getZskId(zskName), getModelIdByModelName(modelName), documentId);
return MaxKbImpl.manualQuestion(getZskId(zskName), getModelIdByModelName(modelName), documentId);
}
}

@ -2,8 +2,11 @@ package Tools.MaxKb;
import Tools.MaxKb.Service.MaxKbService;
import Tools.MaxKb.Util.MaxKbUtil;
import com.alibaba.fastjson.JSONObject;
import com.jfinal.kit.PropKit;
import java.sql.SQLOutput;
public class UploadQA {
//要上传的QA知识内容
static String uploadFile = "D:\\dsWork\\QingLong\\Doc\\MaxKB\\黄海的个人简历【QA版本】.xlsx";
@ -21,8 +24,7 @@ public class UploadQA {
//2、手动生成问题
String modelName = "DeepSeek";//使用哪个模型
service.genQuestion(zskName, modelName, documentId);
JSONObject res = service.manualQuestion(zskName, modelName, documentId);
System.out.println("恭喜,所有操作成功完成!");
}
}
Loading…
Cancel
Save