提交 280ec2b9 作者: ZhangJingKun

支持ppt

上级 5972e84d
......@@ -18,6 +18,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
......@@ -108,6 +109,7 @@ public class KnowledgeController {
* @param knowledge
* @return
*/
//todo 添加文件
@ApiOperation(value = "知识-添加", notes = "知识-添加")
@PostMapping(value = "/uploadKnowledge")
public Result<?> uploadKnowledge(HttpServletRequest request, Knowledge knowledge) {
......@@ -134,7 +136,9 @@ public class KnowledgeController {
for (KnowFile knowFileResult : resultList) {
knowledge.setId(null);
knowledge.setTitle(null);
knowledgeService.addKnowledge(knowFileResult, knowledge, userInfo);
Knowledge knowledgeNew = new Knowledge();
BeanUtils.copyProperties(knowledge, knowledgeNew);
knowledgeService.addKnowledge(knowFileResult, knowledgeNew, userInfo);
}
}
......@@ -177,6 +181,7 @@ public class KnowledgeController {
*/
@PostMapping(value = "/IntelligentQa")
public Result<?> intelligentQa(@RequestBody IntelligentQaParam intelligentQaParam) throws IOException {
log.info(intelligentQaParam.toString());
JSONObject params = new JSONObject();
params.put("score_threshold", intelligentQaParam.getScoreThreshold());
params.put("question", intelligentQaParam.getQuestion());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论