赛派号

抚州市姓氏人口排名 Runtime

GenerateAnswer call to query the knowledgebase.

POST {RuntimeEndpoint}/qnamaker/knowledgebases/{kbId}/generateAnswer 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 context

Context

Context object with previous QnA's information.

isTest

boolean

Query against the test index.

qnaId

string

Exact qnaId to fetch from the knowledgebase, this field takes priority over question.

question

string

User question to query against the knowledge base.

rankerType

string

Optional field. Set to 'QuestionOnly' for using a question only Ranker.

scoreThreshold

number

Threshold for answers returned based on score.

strictFilters

MetadataDTO[]

Find only answers that contain these metadata.

strictFiltersCompoundOperationType

StrictFiltersCompoundOperationType

Optional field. Set to OR for using OR as Operation for Strict Filters.

top

integer (int32)

Max number of answers to be returned for the question.

userId

string

Unique identifier for the user. Optional parameter for telemetry. For more information, refer Analytics and Telemetry.

Responses Name Type Description 200 OK

QnASearchResultList

GenerateAnswer call response.

Other Status Codes

ErrorResponse

Error response.

Security Authorization

Type: apiKey In: header

Examples Successful query Sample request HTTP POST {RuntimeEndpoint}/qnamaker/knowledgebases/9d091697-fb8c-4ed5-9ac0-35bf8273bfff/generateAnswer { "question": "qna maker and luis", "top": 6, "isTest": true, "scoreThreshold": 20, "strictFilters": [ { "name": "category", "value": "api" } ], "userId": "sd53lsY=" } Sample response Status code: 200 { "answers": [ { "score": 28.54820341616869, "id": 20, "answer": "There is no direct integration of LUIS with QnA Maker. But, in your bot code, you can use LUIS and QnA Maker together.", "source": "Custom Editorial", "questions": [ "How can I integrate LUIS with QnA Maker?" ], "metadata": [ { "name": "category", "value": "api" } ] } ] } Definitions Name Description Context

Context of a QnA

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.

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.

MetadataDTO

Name - value pair of metadata.

PromptDTO

Prompt for an answer.

Qna

QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object

QnASearchResult

Represents Search Result.

QnASearchResultList

Represents List of Question Answers.

QueryDTO

POST body schema to query the knowledgebase.

StrictFiltersCompoundOperationType

Optional field. Set to OR for using OR as Operation for Strict Filters.

Context Object

Context of a QnA

Name Type Description isContextOnly

boolean

To mark if a prompt is relevant only with a previous question or not. true - Do not include this QnA as search result for queries without context false - ignores context and includes this QnA in search result

prompts

PromptDTO[]

List of prompts associated with the answer.

Error Object

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 Enumeration

One of a server-defined set of error codes.

Value Description BadArgument Forbidden NotFound KbNotFound Unauthorized Unspecified EndpointKeysError QuotaExceeded QnaRuntimeError SKULimitExceeded OperationNotFound ServiceError ValidationFailure ExtractionFailure ErrorResponse Object

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.

InnerErrorModel Object

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.

MetadataDTO Object

Name - value pair of metadata.

Name Type Description name

string

minLength: 1maxLength: 100

Metadata name.

value

string

minLength: 1maxLength: 500

Metadata value.

PromptDTO Object

Prompt for an answer.

Name Type Description displayOrder

integer (int32)

Index of the prompt - used in ordering of the prompts

displayText

string

maxLength: 200

Text displayed to represent a follow up question prompt

qna

Qna

QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object

qnaId

integer (int32)

Qna id corresponding to the prompt - if QnaId is present, QnADTO object is ignored.

Qna Object

QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object

Name Type Description answer

string

minLength: 1maxLength: 25000

Answer text

context

Context

Context of a QnA

id

integer (int32)

Unique id for the Q-A.

metadata

MetadataDTO[]

List of metadata associated with the answer.

questions

string[]

List of questions associated with the answer.

source

string

maxLength: 300

Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs

QnASearchResult Object

Represents Search Result.

Name Type Description answer

string

Answer.

context

Context

Context object of the QnA

id

integer (int32)

Id of the QnA result.

metadata

MetadataDTO[]

List of metadata.

questions

string[]

List of questions.

score

number

Search result score.

source

string

Source of QnA result.

QnASearchResultList Object

Represents List of Question Answers.

Name Type Description answers

QnASearchResult[]

Represents Search Result list.

QueryDTO Object

POST body schema to query the knowledgebase.

Name Type Description context

Context

Context object with previous QnA's information.

isTest

boolean

Query against the test index.

qnaId

string

Exact qnaId to fetch from the knowledgebase, this field takes priority over question.

question

string

User question to query against the knowledge base.

rankerType

string

Optional field. Set to 'QuestionOnly' for using a question only Ranker.

scoreThreshold

number

Threshold for answers returned based on score.

strictFilters

MetadataDTO[]

Find only answers that contain these metadata.

strictFiltersCompoundOperationType

StrictFiltersCompoundOperationType

Optional field. Set to OR for using OR as Operation for Strict Filters.

top

integer (int32)

Max number of answers to be returned for the question.

userId

string

Unique identifier for the user. Optional parameter for telemetry. For more information, refer Analytics and Telemetry.

StrictFiltersCompoundOperationType Enumeration

Optional field. Set to OR for using OR as Operation for Strict Filters.

Value Description AND OR

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lsinopec@gmail.com举报,一经查实,本站将立刻删除。

上一篇 没有了

下一篇没有了