You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
945 B

package Tools.MaxKb;
import Tools.MaxKb.Service.MaxKbService;
import Tools.MaxKb.Util.MaxKbUtil;
import com.jfinal.kit.PropKit;
public class UploadQA {
//要上传的QA知识内容
static String uploadFile = "D:\\dsWork\\QingLong\\Doc\\MaxKB\\黄海的个人简历【QA版本】.xlsx";
static MaxKbService service = new MaxKbService();
public static void main(String[] args) throws Exception {
//加载配置文件
PropKit.use("MaxKb.properties");
//初始化数据库
MaxKbUtil.Init();
//1、上传文件
String zskName = "知识库【模板】";
String documentId = service.uploadQA(zskName, uploadFile);
//2、手动生成问题
String modelName = "DeepSeek";//使用哪个模型
service.generateQuestion(zskName, modelName, documentId);
System.out.println("恭喜,所有操作成功完成!");
}
}