类 Knowledgebase
- java.lang.Object
-
- com.baidubce.appbuilder.base.component.Component
-
- com.baidubce.appbuilder.console.knowledgebase.Knowledgebase
-
public class Knowledgebase extends Component
-
-
字段概要
-
从类继承的字段 com.baidubce.appbuilder.base.component.Component
httpClient
-
-
构造器概要
构造器 构造器 说明 Knowledgebase()Knowledgebase(String SecretKey)
-
方法概要
-
-
-
构造器详细资料
-
Knowledgebase
public Knowledgebase()
-
Knowledgebase
public Knowledgebase(String SecretKey)
-
-
方法详细资料
-
uploadFile
public String uploadFile(String filePath) throws IOException, AppBuilderServerException
上传文档- 参数:
filePath- 文件路径- 返回:
- 上传成功后的文档ID
- 抛出:
IOException- 当文件上传失败时抛出IOExceptionAppBuilderServerException- 当服务器返回错误码时抛出AppBuilderServerException
-
uploadFile
public String uploadFile(String filePath, String clientToken) throws IOException, AppBuilderServerException
-
addDocument
public String[] addDocument(DocumentAddRequest req) throws IOException, AppBuilderServerException
新增知识库文档- 参数:
req- 请求参数- 返回:
- documentIds 文档ID
- 抛出:
IOException- 当文件上传失败时抛出IOExceptionAppBuilderServerException- 当服务器返回错误码时抛出AppBuilderServerException
-
addDocument
public String[] addDocument(DocumentAddRequest req, String clientToken) throws IOException, AppBuilderServerException
-
getDocumentList
public Document[] getDocumentList(DocumentListRequest request) throws IOException, AppBuilderServerException
-
deleteDocument
public void deleteDocument(DocumentDeleteRequest request) throws IOException, AppBuilderServerException
-
deleteDocument
public void deleteDocument(DocumentDeleteRequest request, String clientToken) throws IOException, AppBuilderServerException
-
createKnowledgeBase
public KnowledgeBaseDetail createKnowledgeBase(KnowledgeBaseDetail request) throws IOException, AppBuilderServerException
-
createKnowledgeBase
public KnowledgeBaseDetail createKnowledgeBase(KnowledgeBaseDetail request, String clientToken) throws IOException, AppBuilderServerException
-
getKnowledgeBaseDetail
public KnowledgeBaseDetail getKnowledgeBaseDetail(String knowledgeBaseId) throws IOException, AppBuilderServerException
-
deleteKnowledgeBase
public void deleteKnowledgeBase(String knowledgeBaseId) throws IOException, AppBuilderServerException
-
deleteKnowledgeBase
public void deleteKnowledgeBase(String knowledgeBaseId, String clientToken) throws IOException, AppBuilderServerException
-
modifyKnowledgeBase
public void modifyKnowledgeBase(KnowledgeBaseModifyRequest request) throws IOException, AppBuilderServerException
-
modifyKnowledgeBase
public void modifyKnowledgeBase(KnowledgeBaseModifyRequest request, String clientToken) throws IOException, AppBuilderServerException
-
getKnowledgeBaseList
public KnowledgeBaseListResponse getKnowledgeBaseList(KnowledgeBaseListRequest request) throws IOException, AppBuilderServerException
-
createDocuments
public void createDocuments(DocumentsCreateRequest request) throws IOException, AppBuilderServerException
-
createDocuments
public void createDocuments(DocumentsCreateRequest request, String clientToken) throws IOException, AppBuilderServerException
-
uploadDocuments
public void uploadDocuments(String filePath, DocumentsCreateRequest request) throws IOException, AppBuilderServerException
-
uploadDocuments
public void uploadDocuments(String filePath, DocumentsCreateRequest request, String clientToken) throws IOException, AppBuilderServerException
-
createChunk
public String createChunk(String documentId, String content) throws IOException, AppBuilderServerException
-
createChunk
public String createChunk(String documentId, String content, String clientToken) throws IOException, AppBuilderServerException
-
modifyChunk
public void modifyChunk(String chunkId, String content, boolean enable) throws IOException, AppBuilderServerException
-
modifyChunk
public void modifyChunk(String chunkId, String content, boolean enable, String clientToken) throws IOException, AppBuilderServerException
-
deleteChunk
public void deleteChunk(String chunkId) throws IOException, AppBuilderServerException
-
deleteChunk
public void deleteChunk(String chunkId, String clientToken) throws IOException, AppBuilderServerException
-
describeChunk
public ChunkDescribeResponse describeChunk(String chunkId) throws IOException, AppBuilderServerException
-
describeChunks
public ChunksDescribeResponse describeChunks(String documentId, String marker, Integer maxKeys, String type) throws IOException, AppBuilderServerException
-
-