Commit 7b441fe3 authored by 林洋洋's avatar 林洋洋

切片相关代码提交

parent 84618d9a
......@@ -42,10 +42,14 @@ public class AskVectorStore implements Serializable {
@Schema(description = "文档ID")
private Long documentId;
@Schema(description = "知识库ID")
private Long knowledgeBaseId;
@Schema(description = "标题")
private String title;
@Schema(description = "启用状态")
private Integer isEnabled;
}
\ No newline at end of file
......@@ -460,6 +460,10 @@ public class KnowledgeDocumentServiceImpl extends ServiceImpl<KnowledgeDocumentM
metadata.put("isEnabled", 1); //启用
metadata.put("createTime", LocalDateTime.now().toString());
askVectorStore.setContent(vo.getContent());
askVectorStore.setTitle(vo.getTitle());
askVectorStore.setIsEnabled(1);
askVectorStore.setDocumentId(document.getId());
askVectorStore.setKnowledgeBaseId(document.getKnowledgeBaseId());
try {
askVectorStore.setMetadata(objectMapper.writeValueAsString(metadata));
} catch (JsonProcessingException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment