Knowledgebase class

Class representing a Knowledgebase.

Constructors

Knowledgebase(QnAMakerClientContext)

Create a Knowledgebase.

Methods

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

Constructor Details

Knowledgebase(QnAMakerClientContext)

Create a Knowledgebase.

new Knowledgebase(client: QnAMakerClientContext)

Parameters

client
QnAMakerClientContext

Reference to the service client.

Method Details

create(CreateKbDTO, msRest.RequestOptionsBase)

function create(createKbPayload: CreateKbDTO, options?: msRest.RequestOptionsBase)

Parameters

createKbPayload
CreateKbDTO

Post body of the request.

options
msRest.RequestOptionsBase

Returns

Promise<Models.KnowledgebaseCreateResponse>

Promise<Models.KnowledgebaseCreateResponse>

create(CreateKbDTO, RequestOptionsBase, ServiceCallback<Operation>)

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

Parameters

createKbPayload
CreateKbDTO

Post body of the request.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<Operation>

The callback

create(CreateKbDTO, ServiceCallback<Operation>)

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

Parameters

createKbPayload
CreateKbDTO

Post body of the request.

callback

ServiceCallback<Operation>

The callback

deleteMethod(string, msRest.RequestOptionsBase)

function deleteMethod(kbId: string, options?: msRest.RequestOptionsBase)

Parameters

kbId

string

Knowledgebase id.

options
msRest.RequestOptionsBase

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

deleteMethod(string, RequestOptionsBase, ServiceCallback<void>)

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

Parameters

kbId

string

Knowledgebase id.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<void>

The callback

deleteMethod(string, ServiceCallback<void>)

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

Parameters

kbId

string

Knowledgebase id.

callback

ServiceCallback<void>

The callback

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

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

Parameters

kbId

string

Knowledgebase id.

environment
Models.EnvironmentType

Specifies whether environment is Test or Prod. Possible values include: 'Prod', 'Test'

options
KnowledgebaseDownloadOptionalParams

The optional parameters

callback

ServiceCallback<QnADocumentsDTO>

The callback

download(string, Models.EnvironmentType, Models.KnowledgebaseDownloadOptionalParams)

function download(kbId: string, environment: Models.EnvironmentType, options?: Models.KnowledgebaseDownloadOptionalParams)

Parameters

kbId

string

Knowledgebase id.

environment
Models.EnvironmentType

Specifies whether environment is Test or Prod. Possible values include: 'Prod', 'Test'

options
Models.KnowledgebaseDownloadOptionalParams

Returns

Promise<Models.KnowledgebaseDownloadResponse>

Promise<Models.KnowledgebaseDownloadResponse>

download(string, Models.EnvironmentType, ServiceCallback<QnADocumentsDTO>)

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

Parameters

kbId

string

Knowledgebase id.

environment
Models.EnvironmentType

Specifies whether environment is Test or Prod. Possible values include: 'Prod', 'Test'

callback

ServiceCallback<QnADocumentsDTO>

The callback

generateAnswer(string, QueryDTO, msRest.RequestOptionsBase)

function generateAnswer(kbId: string, generateAnswerPayload: QueryDTO, options?: msRest.RequestOptionsBase)

Parameters

kbId

string

Knowledgebase id.

generateAnswerPayload
QueryDTO

Post body of the request.

options
msRest.RequestOptionsBase

Returns

Promise<Models.KnowledgebaseGenerateAnswerResponse>

Promise<Models.KnowledgebaseGenerateAnswerResponse>

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

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

Parameters

kbId

string

Knowledgebase id.

generateAnswerPayload
QueryDTO

Post body of the request.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<QnASearchResultList>

The callback

generateAnswer(string, QueryDTO, ServiceCallback<QnASearchResultList>)

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

Parameters

kbId

string

Knowledgebase id.

generateAnswerPayload
QueryDTO

Post body of the request.

callback

ServiceCallback<QnASearchResultList>

The callback

getDetails(string, msRest.RequestOptionsBase)

function getDetails(kbId: string, options?: msRest.RequestOptionsBase)

Parameters

kbId

string

Knowledgebase id.

options
msRest.RequestOptionsBase

Returns

Promise<Models.KnowledgebaseGetDetailsResponse>

Promise<Models.KnowledgebaseGetDetailsResponse>

getDetails(string, RequestOptionsBase, ServiceCallback<KnowledgebaseDTO>)

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

Parameters

kbId

string

Knowledgebase id.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<KnowledgebaseDTO>

The callback

getDetails(string, ServiceCallback<KnowledgebaseDTO>)

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

Parameters

kbId

string

Knowledgebase id.

callback

ServiceCallback<KnowledgebaseDTO>

The callback

listAll(msRest.RequestOptionsBase)

function listAll(options?: msRest.RequestOptionsBase)

Parameters

options
msRest.RequestOptionsBase

Returns

Promise<Models.KnowledgebaseListAllResponse>

Promise<Models.KnowledgebaseListAllResponse>

listAll(RequestOptionsBase, ServiceCallback<KnowledgebasesDTO>)

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

Parameters

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<KnowledgebasesDTO>

The callback

listAll(ServiceCallback<KnowledgebasesDTO>)

function listAll(callback: ServiceCallback<KnowledgebasesDTO>)

Parameters

callback

ServiceCallback<KnowledgebasesDTO>

The callback

publish(string, msRest.RequestOptionsBase)

function publish(kbId: string, options?: msRest.RequestOptionsBase)

Parameters

kbId

string

Knowledgebase id.

options
msRest.RequestOptionsBase

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

publish(string, RequestOptionsBase, ServiceCallback<void>)

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

Parameters

kbId

string

Knowledgebase id.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<void>

The callback

publish(string, ServiceCallback<void>)

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

Parameters

kbId

string

Knowledgebase id.

callback

ServiceCallback<void>

The callback

replace(string, ReplaceKbDTO, msRest.RequestOptionsBase)

function replace(kbId: string, replaceKb: ReplaceKbDTO, options?: msRest.RequestOptionsBase)

Parameters

kbId

string

Knowledgebase id.

replaceKb
ReplaceKbDTO

An instance of ReplaceKbDTO which contains list of qnas to be uploaded

options
msRest.RequestOptionsBase

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

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

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

Parameters

kbId

string

Knowledgebase id.

replaceKb
ReplaceKbDTO

An instance of ReplaceKbDTO which contains list of qnas to be uploaded

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<void>

The callback

replace(string, ReplaceKbDTO, ServiceCallback<void>)

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

Parameters

kbId

string

Knowledgebase id.

replaceKb
ReplaceKbDTO

An instance of ReplaceKbDTO which contains list of qnas to be uploaded

callback

ServiceCallback<void>

The callback

train(string, FeedbackRecordsDTO, msRest.RequestOptionsBase)

function train(kbId: string, trainPayload: FeedbackRecordsDTO, options?: msRest.RequestOptionsBase)

Parameters

kbId

string

Knowledgebase id.

trainPayload
FeedbackRecordsDTO

Post body of the request.

options
msRest.RequestOptionsBase

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

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

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

Parameters

kbId

string

Knowledgebase id.

trainPayload
FeedbackRecordsDTO

Post body of the request.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<void>

The callback

train(string, FeedbackRecordsDTO, ServiceCallback<void>)

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

Parameters

kbId

string

Knowledgebase id.

trainPayload
FeedbackRecordsDTO

Post body of the request.

callback

ServiceCallback<void>

The callback

update(string, UpdateKbOperationDTO, msRest.RequestOptionsBase)

function update(kbId: string, updateKb: UpdateKbOperationDTO, options?: msRest.RequestOptionsBase)

Parameters

kbId

string

Knowledgebase id.

updateKb
UpdateKbOperationDTO

Post body of the request.

options
msRest.RequestOptionsBase

Returns

Promise<Models.KnowledgebaseUpdateResponse>

Promise<Models.KnowledgebaseUpdateResponse>

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

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

Parameters

kbId

string

Knowledgebase id.

updateKb
UpdateKbOperationDTO

Post body of the request.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<Operation>

The callback

update(string, UpdateKbOperationDTO, ServiceCallback<Operation>)

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

Parameters

kbId

string

Knowledgebase id.

updateKb
UpdateKbOperationDTO

Post body of the request.

callback

ServiceCallback<Operation>

The callback