Dela via


Runtime - Train

Train call to add suggestions to the knowledgebase.

POST {RuntimeEndpoint}/qnamaker/knowledgebases/{kbId}/train

URI Parameters

Name In Required Type Description
kbId
path True

string

Knowledgebase id.

RuntimeEndpoint
path True

string

QnA Maker App Service endpoint (for example: https://{qnaservice-hostname}.azurewebsites.net).

Request Header

Name Required Type Description
Authorization True

string

Request Body

Name Type Description
feedbackRecords

FeedbackRecordDTO[]

List of feedback records.

Responses

Name Type Description
204 No Content

HTTP 204 No Content.

Other Status Codes

ErrorResponse

Error response.

Security

Authorization

Type: apiKey
In: header

Examples

Successful query

Sample request

POST {RuntimeEndpoint}/qnamaker/knowledgebases/9d091697-fb8c-4ed5-9ac0-35bf8273bfff/train


{
  "feedbackRecords": [
    {
      "userId": "sd53lsY=",
      "userQuestion": "qna maker with luis",
      "qnaId": 4
    }
  ]
}

Sample response

Definitions

Name Description
Error

The error object. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

ErrorCodeType

One of a server-defined set of error codes.

ErrorResponse

Error response. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

FeedbackRecordDTO

Active learning feedback record.

FeedbackRecordsDTO

Active learning 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.

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

ErrorCodeType

One of a server-defined set of error codes.

details

Error[]

An array of details about specific errors that led to this reported error.

innerError

InnerErrorModel

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

ErrorCodeType

One of a server-defined set of error codes.

Name Type Description
BadArgument

string

EndpointKeysError

string

ExtractionFailure

string

Forbidden

string

KbNotFound

string

NotFound

string

OperationNotFound

string

QnaRuntimeError

string

QuotaExceeded

string

SKULimitExceeded

string

ServiceError

string

Unauthorized

string

Unspecified

string

ValidationFailure

string

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

Error

The error object.

FeedbackRecordDTO

Active learning feedback record.

Name Type Description
qnaId

integer

The qnaId for which the suggested question is provided as feedback.

userId

string

Unique identifier for the user.

userQuestion

string

The suggested question being provided as feedback.

FeedbackRecordsDTO

Active learning feedback records.

Name Type Description
feedbackRecords

FeedbackRecordDTO[]

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

string

A more specific error code than was provided by the containing error.

innerError

InnerErrorModel

An object containing more specific information than the current object about the error.