Runtime - Train
Train call to add suggestions to the knowledgebase.
POST {RuntimeEndpoint}/qnamaker/knowledgebases/{kbId}/train
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
kb
|
path | True |
|
Knowledgebase id. |
|
Runtime
|
path | True |
|
QnA Maker App Service endpoint (for example: https://{qnaservice-hostname}.azurewebsites.net). |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| Authorization | True |
|
Request Body
| Name | Type | Description |
|---|---|---|
| feedbackRecords |
List of feedback records. |
Responses
| Name | Type | Description |
|---|---|---|
| 204 No Content |
HTTP 204 No Content. |
|
| Other Status Codes |
Error response. |
Security
Authorization
Type:
apiKey
In:
header
Examples
Successful query
Sample Request
POST {RuntimeEndpoint}/qnamaker/knowledgebases/9d091697-fb8c-4ed5-9ac0-35bf8273bfff/train
Authorization: EndpointKey {Primary/Secondary Endpoint Key}
{
"feedbackRecords": [
{
"userId": "sd53lsY=",
"userQuestion": "qna maker with luis",
"qnaId": 4
}
]
}
Sample Response
Definitions
| Error |
The error object. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
|
Error |
One of a server-defined set of error codes. |
|
Error |
Error response. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
|
Feedback |
Active learning feedback record. |
|
Feedback |
Active learning feedback records. |
|
Inner |
An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
Error
The error object. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
| Name | Type | Description |
|---|---|---|
| code |
One of a server-defined set of error codes. |
|
| details |
|
An array of details about specific errors that led to this reported error. |
| innerError |
An object containing more specific information than the current object about the error. |
|
| message |
|
A human-readable representation of the error. |
| target |
|
The target of the error. |
ErrorCodeType
One of a server-defined set of error codes.
| Name | Type | Description |
|---|---|---|
| BadArgument |
|
|
| EndpointKeysError |
|
|
| ExtractionFailure |
|
|
| Forbidden |
|
|
| KbNotFound |
|
|
| NotFound |
|
|
| OperationNotFound |
|
|
| QnaRuntimeError |
|
|
| QuotaExceeded |
|
|
| SKULimitExceeded |
|
|
| ServiceError |
|
|
| Unauthorized |
|
|
| Unspecified |
|
|
| ValidationFailure |
|
ErrorResponse
Error response. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
FeedbackRecordDTO
Active learning feedback record.
| Name | Type | Description |
|---|---|---|
| qnaId |
|
The qnaId for which the suggested question is provided as feedback. |
| userId |
|
Unique identifier for the user. |
| userQuestion |
|
The suggested question being provided as feedback. |
FeedbackRecordsDTO
Active learning feedback records.
| Name | Type | Description |
|---|---|---|
| feedbackRecords |
List of feedback records. |
InnerErrorModel
An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
| Name | Type | Description |
|---|---|---|
| code |
|
A more specific error code than was provided by the containing error. |
| innerError |
An object containing more specific information than the current object about the error. |