4 天以前 83e1b4d0e661f11a407fd6ea86e906b9b87b7180
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package cn.iocoder.yudao.module.ai.service.knowledge;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.ai.controller.admin.knowledge.vo.document.*;
import cn.iocoder.yudao.module.ai.controller.admin.knowledge.vo.segment.AiKnowledgeSegmentProcessRespVO;
import cn.iocoder.yudao.module.ai.dal.dataobject.knowledge.AiKnowledgeDocumentDO;
import jakarta.validation.Valid;
 
import java.util.List;
 
public interface AiKnowledgeDocumentService {
 
    List<Long> createDocuments(@Valid AiKnowledgeDocumentCreateReqVO createReqVO);
 
    void updateDocument(@Valid AiKnowledgeDocumentUpdateReqVO updateReqVO);
 
    void deleteDocument(Long id);
 
    AiKnowledgeDocumentDO getDocument(Long id);
 
    AiKnowledgeDocumentDO validateDocumentExists(Long id);
 
    PageResult<AiKnowledgeDocumentDO> getDocumentPage(AiKnowledgeDocumentPageReqVO pageReqVO);
 
    void updateDocumentStatus(@Valid AiKnowledgeDocumentUpdateStatusReqVO updateStatusReqVO);
 
    List<AiKnowledgeSegmentProcessRespVO> getDocumentProcessingProgress(List<Long> documentIds);
 
    void processDocumentSegments(Long documentId);
 
    /**
     * 预览文档切分结果(不保存)
     *
     * @param url              文档 URL
     * @param name             文档名称
     * @param segmentMaxTokens 分段最大 Token 数
     * @return 切分后的分段文本列表
     */
    List<String> previewSplit(String url, String name, Integer segmentMaxTokens);
 
}