public interface IDifyDatasetClient
DatasetResponse<List<com.alibaba.fastjson.JSONObject>> getDatasets(Integer page, Integer limit, Boolean includeAll, String keyword, List<String> tagIds) throws IOException
page - 页码limit - 每页数量includeAll - 是否包含所有数据集(仅对所有者生效),可选,默认为 falsekeyword - 搜索关键词,可选tagIds - 标签 ID 列表,可选IOException - 错误DocumentCreateResponse createDocumentByText(String datasetId, AddDocumentRequest addDocumentRequest) throws IOException, InterruptedException
datasetId - 知识库 IDaddDocumentRequest - 创建文档请求IOException - 错误InterruptedExceptionDocumentCreateResponse updateDocumentByText(String datasetId, String documentId, AddDocumentRequest addDocumentRequest) throws IOException, InterruptedException
datasetId - 知识库 IDdocumentId - 文档 IDaddDocumentRequest - 创建文档请求IOException - 错误InterruptedExceptionDatasetResponse<List<Document>> getDocumentList(Integer page, Integer limit, String datasetId, String keyword) throws IOException, InterruptedException
page - 页码limit - 返回条数,可选,默认 20,范围 1-100datasetId - 知识库 IDkeyword - 搜索关键词,可选,目前仅搜索文档名称IOException - 错误InterruptedExceptionvoid deleteDocument(String datasetId, String documentId) throws IOException, InterruptedException
datasetId - 知识库 IDdocumentId - 文档 IDIOException - 错误InterruptedExceptionDocument getDocumentInfo(String datasetId, String documentId) throws IOException, InterruptedException
datasetId - 知识库 IDdocumentId - 文档 IDIOException - 错误InterruptedExceptionDatasetResponse<List<Segment>> createSegment(String datasetId, String documentId, SegmentAddRequest segment) throws IOException, InterruptedException
datasetId - 知识库 IDdocumentId - 文档 IDIOException - 错误InterruptedExceptionDatasetResponse<Segment> updateSegment(String datasetId, String documentId, String segmentId, SegmentUpdateRequest segment) throws IOException, InterruptedException
datasetId - 知识库 IDdocumentId - 文档 IDIOException - 错误InterruptedExceptionDatasetResponse<List<Segment>> getSegments(Integer page, Integer limit, String datasetId, String documentId, String keyword, String status) throws IOException, InterruptedException
page - 页码limit - 返回条数,可选,默认 20,范围 1-100datasetId - 知识库 IDdocumentId - 文档 IDkeyword - 搜索关键词,可选status - 搜索状态,completedIOException - 错误InterruptedExceptionDatasetResponse<Segment> getSegmentInfo(String datasetId, String documentId, String segmentId) throws IOException, InterruptedException
datasetId - 知识库 IDdocumentId - 文档 IDsegmentId - 文档分段 IDIOException - 错误InterruptedExceptionvoid deleteSegment(String datasetId, String documentId, String segmentId) throws IOException, InterruptedException
datasetId - 知识库 IDdocumentId - 文档 IDsegmentId - 文档分段 IDIOException - 错误InterruptedExceptionvoid updateDocumentMeta(String datasetId, UpdateDocumentMetadata updateDocumentMetadata) throws IOException, InterruptedException
datasetId - 知识库 IDupdateDocumentMetadata - 文档元数据IOException - 错误InterruptedExceptionCopyright © 2025. All rights reserved.