你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Knowledgebase class

表示知识库的类。

构造函数

Knowledgebase(QnAMakerClientContext)

创建知识库。

方法

create(CreateKbDTO, RequestOptionsBase)
create(CreateKbDTO, RequestOptionsBase, ServiceCallback<Operation>)
create(CreateKbDTO, ServiceCallback<Operation>)
deleteMethod(string, RequestOptionsBase)
deleteMethod(string, RequestOptionsBase, ServiceCallback<void>)
deleteMethod(string, ServiceCallback<void>)
download(string, EnvironmentType, KnowledgebaseDownloadOptionalParams)
download(string, EnvironmentType, KnowledgebaseDownloadOptionalParams, ServiceCallback<QnADocumentsDTO>)
download(string, EnvironmentType, ServiceCallback<QnADocumentsDTO>)
generateAnswer(string, QueryDTO, RequestOptionsBase)
generateAnswer(string, QueryDTO, RequestOptionsBase, ServiceCallback<QnASearchResultList>)
generateAnswer(string, QueryDTO, ServiceCallback<QnASearchResultList>)
getDetails(string, RequestOptionsBase)
getDetails(string, RequestOptionsBase, ServiceCallback<KnowledgebaseDTO>)
getDetails(string, ServiceCallback<KnowledgebaseDTO>)
listAll(RequestOptionsBase)
listAll(RequestOptionsBase, ServiceCallback<KnowledgebasesDTO>)
listAll(ServiceCallback<KnowledgebasesDTO>)
publish(string, RequestOptionsBase)
publish(string, RequestOptionsBase, ServiceCallback<void>)
publish(string, ServiceCallback<void>)
replace(string, ReplaceKbDTO, RequestOptionsBase)
replace(string, ReplaceKbDTO, RequestOptionsBase, ServiceCallback<void>)
replace(string, ReplaceKbDTO, ServiceCallback<void>)
train(string, FeedbackRecordsDTO, RequestOptionsBase)
train(string, FeedbackRecordsDTO, RequestOptionsBase, ServiceCallback<void>)
train(string, FeedbackRecordsDTO, ServiceCallback<void>)
update(string, UpdateKbOperationDTO, RequestOptionsBase)
update(string, UpdateKbOperationDTO, RequestOptionsBase, ServiceCallback<Operation>)
update(string, UpdateKbOperationDTO, ServiceCallback<Operation>)

构造函数详细信息

Knowledgebase(QnAMakerClientContext)

创建知识库。

new Knowledgebase(client: QnAMakerClientContext)

参数

client
QnAMakerClientContext

对服务客户端的引用。

方法详细信息

create(CreateKbDTO, RequestOptionsBase)

function create(createKbPayload: CreateKbDTO, options?: RequestOptionsBase): Promise<KnowledgebaseCreateResponse>

参数

createKbPayload
CreateKbDTO

发布请求正文。

options
RequestOptionsBase

可选参数

返回

Promise<Models.KnowledgebaseCreateResponse>

create(CreateKbDTO, RequestOptionsBase, ServiceCallback<Operation>)

function create(createKbPayload: CreateKbDTO, options: RequestOptionsBase, callback: ServiceCallback<Operation>)

参数

createKbPayload
CreateKbDTO

发布请求正文。

options
RequestOptionsBase

可选参数

callback

ServiceCallback<Operation>

回调

create(CreateKbDTO, ServiceCallback<Operation>)

function create(createKbPayload: CreateKbDTO, callback: ServiceCallback<Operation>)

参数

createKbPayload
CreateKbDTO

发布请求正文。

callback

ServiceCallback<Operation>

回调

deleteMethod(string, RequestOptionsBase)

function deleteMethod(kbId: string, options?: RequestOptionsBase): Promise<RestResponse>

参数

kbId

string

知识库 ID。

options
RequestOptionsBase

可选参数

返回

Promise<RestResponse>

Promise<msRest.RestResponse>

deleteMethod(string, RequestOptionsBase, ServiceCallback<void>)

function deleteMethod(kbId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)

参数

kbId

string

知识库 ID。

options
RequestOptionsBase

可选参数

callback

ServiceCallback<void>

回调

deleteMethod(string, ServiceCallback<void>)

function deleteMethod(kbId: string, callback: ServiceCallback<void>)

参数

kbId

string

知识库 ID。

callback

ServiceCallback<void>

回调

download(string, EnvironmentType, KnowledgebaseDownloadOptionalParams)

function download(kbId: string, environment: EnvironmentType, options?: KnowledgebaseDownloadOptionalParams): Promise<KnowledgebaseDownloadResponse>

参数

kbId

string

知识库 ID。

environment
EnvironmentType

指定环境是 Test 还是 Prod。可能的值包括:“Prod”、“Test”

返回

Promise<Models.KnowledgebaseDownloadResponse>

download(string, EnvironmentType, KnowledgebaseDownloadOptionalParams, ServiceCallback<QnADocumentsDTO>)

function download(kbId: string, environment: EnvironmentType, options: KnowledgebaseDownloadOptionalParams, callback: ServiceCallback<QnADocumentsDTO>)

参数

kbId

string

知识库 ID。

environment
EnvironmentType

指定环境是 Test 还是 Prod。可能的值包括:“Prod”、“Test”

callback

ServiceCallback<QnADocumentsDTO>

回调

download(string, EnvironmentType, ServiceCallback<QnADocumentsDTO>)

function download(kbId: string, environment: EnvironmentType, callback: ServiceCallback<QnADocumentsDTO>)

参数

kbId

string

知识库 ID。

environment
EnvironmentType

指定环境是 Test 还是 Prod。可能的值包括:“Prod”、“Test”

callback

ServiceCallback<QnADocumentsDTO>

回调

generateAnswer(string, QueryDTO, RequestOptionsBase)

function generateAnswer(kbId: string, generateAnswerPayload: QueryDTO, options?: RequestOptionsBase): Promise<KnowledgebaseGenerateAnswerResponse>

参数

kbId

string

知识库 ID。

generateAnswerPayload
QueryDTO

发布请求正文。

options
RequestOptionsBase

可选参数

返回

Promise<Models.KnowledgebaseGenerateAnswerResponse>

generateAnswer(string, QueryDTO, RequestOptionsBase, ServiceCallback<QnASearchResultList>)

function generateAnswer(kbId: string, generateAnswerPayload: QueryDTO, options: RequestOptionsBase, callback: ServiceCallback<QnASearchResultList>)

参数

kbId

string

知识库 ID。

generateAnswerPayload
QueryDTO

发布请求正文。

options
RequestOptionsBase

可选参数

generateAnswer(string, QueryDTO, ServiceCallback<QnASearchResultList>)

function generateAnswer(kbId: string, generateAnswerPayload: QueryDTO, callback: ServiceCallback<QnASearchResultList>)

参数

kbId

string

知识库 ID。

generateAnswerPayload
QueryDTO

发布请求正文。

getDetails(string, RequestOptionsBase)

function getDetails(kbId: string, options?: RequestOptionsBase): Promise<KnowledgebaseGetDetailsResponse>

参数

kbId

string

知识库 ID。

options
RequestOptionsBase

可选参数

返回

Promise<Models.KnowledgebaseGetDetailsResponse>

getDetails(string, RequestOptionsBase, ServiceCallback<KnowledgebaseDTO>)

function getDetails(kbId: string, options: RequestOptionsBase, callback: ServiceCallback<KnowledgebaseDTO>)

参数

kbId

string

知识库 ID。

options
RequestOptionsBase

可选参数

getDetails(string, ServiceCallback<KnowledgebaseDTO>)

function getDetails(kbId: string, callback: ServiceCallback<KnowledgebaseDTO>)

参数

kbId

string

知识库 ID。

listAll(RequestOptionsBase)

function listAll(options?: RequestOptionsBase): Promise<KnowledgebaseListAllResponse>

参数

options
RequestOptionsBase

可选参数

返回

Promise<Models.KnowledgebaseListAllResponse>

listAll(RequestOptionsBase, ServiceCallback<KnowledgebasesDTO>)

function listAll(options: RequestOptionsBase, callback: ServiceCallback<KnowledgebasesDTO>)

参数

options
RequestOptionsBase

可选参数

listAll(ServiceCallback<KnowledgebasesDTO>)

function listAll(callback: ServiceCallback<KnowledgebasesDTO>)

参数

publish(string, RequestOptionsBase)

function publish(kbId: string, options?: RequestOptionsBase): Promise<RestResponse>

参数

kbId

string

知识库 ID。

options
RequestOptionsBase

可选参数

返回

Promise<RestResponse>

Promise<msRest.RestResponse>

publish(string, RequestOptionsBase, ServiceCallback<void>)

function publish(kbId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)

参数

kbId

string

知识库 ID。

options
RequestOptionsBase

可选参数

callback

ServiceCallback<void>

回调

publish(string, ServiceCallback<void>)

function publish(kbId: string, callback: ServiceCallback<void>)

参数

kbId

string

知识库 ID。

callback

ServiceCallback<void>

回调

replace(string, ReplaceKbDTO, RequestOptionsBase)

function replace(kbId: string, replaceKb: ReplaceKbDTO, options?: RequestOptionsBase): Promise<RestResponse>

参数

kbId

string

知识库 ID。

replaceKb
ReplaceKbDTO

ReplaceKbDTO 的实例,其中包含要上传的 qnas 列表

options
RequestOptionsBase

可选参数

返回

Promise<RestResponse>

Promise<msRest.RestResponse>

replace(string, ReplaceKbDTO, RequestOptionsBase, ServiceCallback<void>)

function replace(kbId: string, replaceKb: ReplaceKbDTO, options: RequestOptionsBase, callback: ServiceCallback<void>)

参数

kbId

string

知识库 ID。

replaceKb
ReplaceKbDTO

ReplaceKbDTO 的实例,其中包含要上传的 qnas 列表

options
RequestOptionsBase

可选参数

callback

ServiceCallback<void>

回调

replace(string, ReplaceKbDTO, ServiceCallback<void>)

function replace(kbId: string, replaceKb: ReplaceKbDTO, callback: ServiceCallback<void>)

参数

kbId

string

知识库 ID。

replaceKb
ReplaceKbDTO

ReplaceKbDTO 的实例,其中包含要上传的 qnas 列表

callback

ServiceCallback<void>

回调

train(string, FeedbackRecordsDTO, RequestOptionsBase)

function train(kbId: string, trainPayload: FeedbackRecordsDTO, options?: RequestOptionsBase): Promise<RestResponse>

参数

kbId

string

知识库 ID。

trainPayload
FeedbackRecordsDTO

发布请求正文。

options
RequestOptionsBase

可选参数

返回

Promise<RestResponse>

Promise<msRest.RestResponse>

train(string, FeedbackRecordsDTO, RequestOptionsBase, ServiceCallback<void>)

function train(kbId: string, trainPayload: FeedbackRecordsDTO, options: RequestOptionsBase, callback: ServiceCallback<void>)

参数

kbId

string

知识库 ID。

trainPayload
FeedbackRecordsDTO

发布请求正文。

options
RequestOptionsBase

可选参数

callback

ServiceCallback<void>

回调

train(string, FeedbackRecordsDTO, ServiceCallback<void>)

function train(kbId: string, trainPayload: FeedbackRecordsDTO, callback: ServiceCallback<void>)

参数

kbId

string

知识库 ID。

trainPayload
FeedbackRecordsDTO

发布请求正文。

callback

ServiceCallback<void>

回调

update(string, UpdateKbOperationDTO, RequestOptionsBase)

function update(kbId: string, updateKb: UpdateKbOperationDTO, options?: RequestOptionsBase): Promise<KnowledgebaseUpdateResponse>

参数

kbId

string

知识库 ID。

updateKb
UpdateKbOperationDTO

发布请求正文。

options
RequestOptionsBase

可选参数

返回

Promise<Models.KnowledgebaseUpdateResponse>

update(string, UpdateKbOperationDTO, RequestOptionsBase, ServiceCallback<Operation>)

function update(kbId: string, updateKb: UpdateKbOperationDTO, options: RequestOptionsBase, callback: ServiceCallback<Operation>)

参数

kbId

string

知识库 ID。

updateKb
UpdateKbOperationDTO

发布请求正文。

options
RequestOptionsBase

可选参数

callback

ServiceCallback<Operation>

回调

update(string, UpdateKbOperationDTO, ServiceCallback<Operation>)

function update(kbId: string, updateKb: UpdateKbOperationDTO, callback: ServiceCallback<Operation>)

参数

kbId

string

知识库 ID。

updateKb
UpdateKbOperationDTO

发布请求正文。

callback

ServiceCallback<Operation>

回调