Knowledgebase class
Class representing a Knowledgebase.
Constructors
Knowledgebase(Qn |
Create a Knowledgebase. |
Methods
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<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
The callback
create(CreateKbDTO, ServiceCallback<Operation>)
function create(createKbPayload: CreateKbDTO, callback: ServiceCallback<Operation>)
Parameters
- createKbPayload
- CreateKbDTO
Post body of the request.
- callback
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'
The optional parameters
Returns
Promise<KnowledgebaseDownloadResponse>
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'
The optional parameters
- callback
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
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<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
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
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<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
The callback
getDetails(string, ServiceCallback<KnowledgebaseDTO>)
function getDetails(kbId: string, callback: ServiceCallback<KnowledgebaseDTO>)
Parameters
- kbId
-
string
Knowledgebase id.
- callback
The callback
listAll(RequestOptionsBase)
function listAll(options?: RequestOptionsBase): Promise<KnowledgebaseListAllResponse>
Parameters
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<KnowledgebaseListAllResponse>
Promise<Models.KnowledgebaseListAllResponse>
listAll(RequestOptionsBase, ServiceCallback<KnowledgebasesDTO>)
function listAll(options: RequestOptionsBase, callback: ServiceCallback<KnowledgebasesDTO>)
Parameters
- options
- RequestOptionsBase
The optional parameters
- callback
The callback
listAll(ServiceCallback<KnowledgebasesDTO>)
function listAll(callback: ServiceCallback<KnowledgebasesDTO>)
Parameters
- callback
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<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
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
The callback