다음을 통해 공유


Prediction - Get Slot Prediction

애플리케이션 슬롯에 대한 예측을 가져옵니다.

POST {Endpoint}/luis/prediction/v3.0/apps/{appId}/slots/{slotName}/predict
POST {Endpoint}/luis/prediction/v3.0/apps/{appId}/slots/{slotName}/predict?verbose={verbose}&show-all-intents={show-all-intents}&log={log}

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
appId
path True

string

uuid

애플리케이션 ID입니다.

Endpoint
path True

string

지원되는 Cognitive Services 엔드포인트(프로토콜 및 호스트 이름( 예: https://westus.api.cognitive.microsoft.com).

slotName
path True

string

애플리케이션 슬롯 이름입니다.

log
query

boolean

엔드포인트 쿼리를 기록할지 여부를 나타냅니다.

show-all-intents
query

boolean

응답의 모든 의도를 반환할지 아니면 상위 의도만 반환할지를 나타냅니다.

verbose
query

boolean

엔터티 예측에 대한 추가 메타데이터를 가져올지 여부를 나타냅니다.

요청 헤더

Name 필수 형식 Description
Ocp-Apim-Subscription-Key True

string

요청 본문

Name 필수 형식 Description
query True

string

예측할 쿼리입니다.

dynamicLists

DynamicList[]

이 요청에 대해 동적으로 생성된 목록 엔터티입니다.

externalEntities

ExternalEntity[]

이 요청에 대해 외부에서 예측된 엔터티입니다.

options

PredictionRequestOptions

이 요청에 대해 정의된 사용자 지정 옵션입니다.

응답

Name 형식 Description
200 OK

PredictionResponse

제공된 쿼리에 대한 예측입니다.

Other Status Codes

Error

예기치 않은 오류입니다.

보안

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

예제

Successful Get Slot Predictions From Endpoint Via Post request

Sample Request

POST {Endpoint}/luis/prediction/v3.0/apps/{Application Id}/slots/{Slot Name}/predict


{
  "query": "forward to frank 30 dollars through HSBC",
  "options": {
    "datetimeReference": "2015-02-13T13:15:00.000Z"
  },
  "externalEntities": [
    {
      "entityName": "Bank",
      "startIndex": 36,
      "entityLength": 4,
      "resolution": {
        "text": "International Bank"
      }
    }
  ],
  "dynamicLists": [
    {
      "listEntityName": "Employees",
      "requestLists": [
        {
          "name": "Management",
          "canonicalForm": "Frank",
          "synonyms": []
        }
      ]
    }
  ]
}

Sample Response

{
  "query": "forward to frank 30 dollars through HSBC",
  "prediction": {
    "topIntent": "give",
    "intents": {
      "give": {
        "score": 0.943442
      }
    },
    "entities": {
      "Employees": [
        [
          "frank"
        ]
      ],
      "number": [
        30
      ],
      "money": [
        {
          "units": "Dollar",
          "value": 30
        }
      ],
      "Bank": [
        {
          "text": "International Bank"
        }
      ]
    },
    "sentiment": {
      "label": "positive",
      "score": 0.9163064
    }
  }
}

정의

Name Description
DynamicList

목록 엔터티에 대한 확장을 정의합니다.

Error

발생한 오류를 나타냅니다.

ErrorBody

발생한 오류의 정의를 나타냅니다.

ExternalEntity

기존 엔터티를 확장하는 사용자 예측 엔터티를 정의합니다.

Intent

의도 예측을 나타냅니다.

Prediction

쿼리의 예측을 나타냅니다.

PredictionRequest

예측 요청 매개 변수를 나타냅니다.

PredictionRequestOptions

예측 요청에 대한 사용자 지정 옵션입니다.

PredictionResponse

예측 응답을 나타냅니다.

RequestList

기존 목록 엔터티에 추가할 하위 목록을 정의합니다.

Sentiment

감정 분석의 결과입니다.

DynamicList

목록 엔터티에 대한 확장을 정의합니다.

Name 형식 Description
listEntityName

string

확장할 목록 엔터티의 이름입니다.

requestLists

RequestList[]

확장 목록 엔터티에 추가할 목록입니다.

Error

발생한 오류를 나타냅니다.

Name 형식 Description
error

ErrorBody

발생한 오류의 정의를 나타냅니다.

ErrorBody

발생한 오류의 정의를 나타냅니다.

Name 형식 Description
code

string

오류 코드입니다.

message

string

오류 메시지입니다.

ExternalEntity

기존 엔터티를 확장하는 사용자 예측 엔터티를 정의합니다.

Name 형식 Description
entityLength

integer

예측된 엔터티의 길이입니다.

entityName

string

확장할 엔터티의 이름입니다.

resolution

사용자가 엔터티의 예측으로 반환하는 사용자 지정 해상도를 제공했습니다.

score

number

엔터티의 예측 점수로 반환할 사용자가 제공한 점수입니다.

startIndex

integer

예측된 엔터티의 시작 문자 인덱스입니다.

Intent

의도 예측을 나타냅니다.

Name 형식 Description
childApp

Prediction

디스패치된 애플리케이션의 예측입니다.

score

number

발생한 의도의 점수입니다.

Prediction

쿼리의 예측을 나타냅니다.

Name 형식 Description
alteredQuery

string

맞춤법 검사 후의 쿼리입니다. 맞춤법 검사 사용하도록 설정되고 맞춤법 오류가 발견된 경우에만 설정합니다.

entities

발생한 엔터티를 나타내는 사전입니다.

intents

<string,  Intent>

발생한 의도를 나타내는 사전입니다.

sentiment

Sentiment

감정 분석의 결과입니다.

topIntent

string

최고 점수 매기기 의도의 이름입니다.

PredictionRequest

예측 요청 매개 변수를 나타냅니다.

Name 형식 Description
dynamicLists

DynamicList[]

이 요청에 대해 동적으로 생성된 목록 엔터티입니다.

externalEntities

ExternalEntity[]

이 요청에 대해 외부에서 예측된 엔터티입니다.

options

PredictionRequestOptions

이 요청에 대해 정의된 사용자 지정 옵션입니다.

query

string

예측할 쿼리입니다.

PredictionRequestOptions

예측 요청에 대한 사용자 지정 옵션입니다.

Name 형식 Description
datetimeReference

string

datetime 엔터티를 예측하는 데 사용되는 참조 DateTime입니다.

preferExternalEntities

boolean

겹치는 경우 외부 엔터티 확인을 수행할지 여부가 예측을 재정의합니다.

PredictionResponse

예측 응답을 나타냅니다.

Name 형식 Description
prediction

Prediction

요청된 쿼리의 예측입니다.

query

string

예측에 사용되는 쿼리입니다.

RequestList

기존 목록 엔터티에 추가할 하위 목록을 정의합니다.

Name 형식 Description
canonicalForm

string

하위 목록의 정식 형식입니다.

name

string

하위 목록의 이름입니다.

synonyms

string[]

정식 형식의 동의어입니다.

Sentiment

감정 분석의 결과입니다.

Name 형식 Description
label

string

감정 분석 결과의 레이블입니다.

score

number

쿼리의 감정 점수입니다.