public class DifyDatasetClientImpl extends DifyBaseClientImpl implements IDifyDatasetClient
| 构造器和说明 |
|---|
DifyDatasetClientImpl(String server,
String apiKey) |
getAppInfo, getAppMetaInfo, getAppParameters, requestJson, requestJson, requestJson, requestJson, requestJson, requestJson, requestJson, requestJson, requestMultipart, requestMultipart, requestMultipart, sendBlocking, sendBlocking, sendStreaming, sendStreaming, sendStreaming, uploadFilepublic DatasetResponse<List<com.alibaba.fastjson.JSONObject>> getDatasets(Integer page, Integer limit, Boolean includeAll, String keyword, List<String> tagIds) throws IOException
IDifyDatasetClientgetDatasets 在接口中 IDifyDatasetClientpage - 页码limit - 每页数量includeAll - 是否包含所有数据集(仅对所有者生效),可选,默认为 falsekeyword - 搜索关键词,可选tagIds - 标签 ID 列表,可选IOException - 错误public DocumentCreateResponse createDocumentByText(String datasetId, AddDocumentRequest addDocumentRequest) throws IOException, InterruptedException
IDifyDatasetClientcreateDocumentByText 在接口中 IDifyDatasetClientdatasetId - 知识库 IDaddDocumentRequest - 创建文档请求IOException - 错误InterruptedExceptionpublic DocumentCreateResponse updateDocumentByText(String datasetId, String documentId, AddDocumentRequest addDocumentRequest) throws IOException, InterruptedException
IDifyDatasetClientupdateDocumentByText 在接口中 IDifyDatasetClientdatasetId - 知识库 IDdocumentId - 文档 IDaddDocumentRequest - 创建文档请求IOException - 错误InterruptedExceptionpublic DatasetResponse<List<Document>> getDocumentList(Integer page, Integer limit, String datasetId, String keyword) throws IOException, InterruptedException
IDifyDatasetClientgetDocumentList 在接口中 IDifyDatasetClientpage - 页码limit - 返回条数,可选,默认 20,范围 1-100datasetId - 知识库 IDkeyword - 搜索关键词,可选,目前仅搜索文档名称IOException - 错误InterruptedExceptionpublic void deleteDocument(String datasetId, String documentId) throws IOException, InterruptedException
IDifyDatasetClientdeleteDocument 在接口中 IDifyDatasetClientdatasetId - 知识库 IDdocumentId - 文档 IDIOException - 错误InterruptedExceptionpublic Document getDocumentInfo(String datasetId, String documentId) throws IOException, InterruptedException
IDifyDatasetClientgetDocumentInfo 在接口中 IDifyDatasetClientdatasetId - 知识库 IDdocumentId - 文档 IDIOException - 错误InterruptedExceptionpublic DatasetResponse<List<Segment>> createSegment(String datasetId, String documentId, SegmentAddRequest segment) throws IOException, InterruptedException
IDifyDatasetClientcreateSegment 在接口中 IDifyDatasetClientdatasetId - 知识库 IDdocumentId - 文档 IDIOException - 错误InterruptedExceptionpublic DatasetResponse<Segment> updateSegment(String datasetId, String documentId, String segmentId, SegmentUpdateRequest segment) throws IOException, InterruptedException
IDifyDatasetClientupdateSegment 在接口中 IDifyDatasetClientdatasetId - 知识库 IDdocumentId - 文档 IDIOException - 错误InterruptedExceptionpublic DatasetResponse<List<Segment>> getSegments(Integer page, Integer limit, String datasetId, String documentId, String keyword, String status) throws IOException, InterruptedException
IDifyDatasetClientgetSegments 在接口中 IDifyDatasetClientpage - 页码limit - 返回条数,可选,默认 20,范围 1-100datasetId - 知识库 IDdocumentId - 文档 IDkeyword - 搜索关键词,可选status - 搜索状态,completedIOException - 错误InterruptedExceptionpublic DatasetResponse<Segment> getSegmentInfo(String datasetId, String documentId, String segmentId) throws IOException, InterruptedException
IDifyDatasetClientgetSegmentInfo 在接口中 IDifyDatasetClientdatasetId - 知识库 IDdocumentId - 文档 IDsegmentId - 文档分段 IDIOException - 错误InterruptedExceptionpublic void deleteSegment(String datasetId, String documentId, String segmentId) throws IOException, InterruptedException
IDifyDatasetClientdeleteSegment 在接口中 IDifyDatasetClientdatasetId - 知识库 IDdocumentId - 文档 IDsegmentId - 文档分段 IDIOException - 错误InterruptedExceptionpublic void updateDocumentMeta(String datasetId, UpdateDocumentMetadata updateDocumentMetadata) throws IOException, InterruptedException
IDifyDatasetClientupdateDocumentMeta 在接口中 IDifyDatasetClientdatasetId - 知识库 IDupdateDocumentMetadata - 文档元数据IOException - 错误InterruptedExceptionCopyright © 2025. All rights reserved.