类 Dataset
- java.lang.Object
-
- com.baidubce.appbuilder.base.component.Component
-
- com.baidubce.appbuilder.console.dataset.Dataset
-
public class Dataset extends Component
-
-
字段概要
-
从类继承的字段 com.baidubce.appbuilder.base.component.Component
httpClient
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String[]addDocuments(List<String> filePaths, boolean isCustomProcessRule, Map<String,Object> customProcessRule, boolean isEnhanced)向数据集中添加文档StringcreateDataset(String datasetName)创建数据集voiddeleteDocument(String documentId)从数据集中删除文档voiddeleteDocuments(String[] documentIds)从数据集中批量删除多个文档DocumentListResponsegetDocumentList(int page, int limit, String keywork)获取文档列表
-
-
-
构造器详细资料
-
Dataset
@Deprecated public Dataset()
已过时。
-
Dataset
@Deprecated public Dataset(String secretKey)
已过时。
-
Dataset
@Deprecated public Dataset(String secretKey, String datasetId)
已过时。
-
-
方法详细资料
-
createDataset
public String createDataset(String datasetName) throws IOException, AppBuilderServerException
创建数据集- 参数:
datasetName- 数据集名称- 返回:
- 返回创建成功后的数据集ID
- 抛出:
IOException- 当请求失败时抛出IOExceptionAppBuilderServerException- 当服务器返回错误码时抛出AppBuilderServerException
-
addDocuments
public String[] addDocuments(List<String> filePaths, boolean isCustomProcessRule, Map<String,Object> customProcessRule, boolean isEnhanced) throws IOException, AppBuilderServerException
向数据集中添加文档- 参数:
filePaths- 要添加的文档文件路径列表isCustomProcessRule- 是否使用自定义处理规则customProcessRule- 自定义处理规则,当isCustomProcessRule为true时,该参数不为空isEnhanced- 是否开启增强模式- 抛出:
IOException- 当文件上传失败时抛出IOExceptionAppBuilderServerException- 当服务器返回错误码时抛出AppBuilderServerException
-
getDocumentList
public DocumentListResponse getDocumentList(int page, int limit, String keywork) throws IOException, AppBuilderServerException
获取文档列表- 参数:
page- 页码limit- 每页文档数量keywork- 搜索关键字- 返回:
- 文档列表
- 抛出:
IOException- 当请求失败时抛出IOExceptionAppBuilderServerException- 当服务器返回错误码时抛出AppBuilderServerException
-
deleteDocument
public void deleteDocument(String documentId) throws IOException, AppBuilderServerException
从数据集中删除文档- 参数:
documentId- 要删除的文档ID- 抛出:
IOException- 当请求失败时抛出IOExceptionAppBuilderServerException- 当服务器返回错误码时抛出AppBuilderServerException
-
deleteDocuments
public void deleteDocuments(String[] documentIds) throws IOException, AppBuilderServerException
从数据集中批量删除多个文档- 参数:
documentIds- 要删除的文档ID数组- 抛出:
IOException- 当请求失败时抛出IOExceptionAppBuilderServerException- 当服务器返回错误码时抛出AppBuilderServerException
-
-