Knowledgebase class

Class representing a Knowledgebase.

Constructors

Knowledgebase(QnAMakerClientContext)

Create a Knowledgebase.

Methods

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>)

Constructor Details

Knowledgebase(QnAMakerClientContext)

Create a Knowledgebase.

new Knowledgebase(client: QnAMakerClientContext)

Parameters

client
QnAMakerClientContext

Reference to the service client.

Method Details

create(CreateKbDTO, RequestOptionsBase)

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

Parameters

createKbPayload
CreateKbDTO

Post body of the request.

options
RequestOptionsBase

The optional parameters

Returns

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, RequestOptionsBase)

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

Parameters

kbId

string

Knowledgebase id.

options
RequestOptionsBase

The optional parameters

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, EnvironmentType, KnowledgebaseDownloadOptionalParams)

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

Parameters

kbId

string

Knowledgebase id.

environment
EnvironmentType

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

options
KnowledgebaseDownloadOptionalParams

The optional parameters

Returns

Promise<Models.KnowledgebaseDownloadResponse>

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

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

Parameters

kbId

string

Knowledgebase id.

environment
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, EnvironmentType, ServiceCallback<QnADocumentsDTO>)

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

Parameters

kbId

string

Knowledgebase id.

environment
EnvironmentType

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

callback

ServiceCallback<QnADocumentsDTO>

The callback

generateAnswer(string, QueryDTO, RequestOptionsBase)

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

Parameters

kbId

string

Knowledgebase id.

generateAnswerPayload
QueryDTO

Post body of the request.

options
RequestOptionsBase

The optional parameters

Returns

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, RequestOptionsBase)

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

Parameters

kbId

string

Knowledgebase id.

options
RequestOptionsBase

The optional parameters

Returns

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(RequestOptionsBase)

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

Parameters

options
RequestOptionsBase

The optional parameters

Returns

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, RequestOptionsBase)

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

Parameters

kbId

string

Knowledgebase id.

options
RequestOptionsBase

The optional parameters

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, RequestOptionsBase)

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

Parameters

kbId

string

Knowledgebase id.

replaceKb
ReplaceKbDTO

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

options
RequestOptionsBase

The optional parameters

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, RequestOptionsBase)

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

Parameters

kbId

string

Knowledgebase id.

trainPayload
FeedbackRecordsDTO

Post body of the request.

options
RequestOptionsBase

The optional parameters

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, RequestOptionsBase)

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

Parameters

kbId

string

Knowledgebase id.

updateKb
UpdateKbOperationDTO

Post body of the request.

options
RequestOptionsBase

The optional parameters

Returns

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