다음을 통해 공유


Examples - Add

애플리케이션 버전에 레이블이 지정된 예제 발화를 추가합니다.

POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/example

URI 매개 변수

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

string (uuid)

애플리케이션 ID입니다.

Endpoint
path True

string

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

versionId
path True

string

버전 ID입니다.

요청 헤더

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

string

요청 본문

Name 형식 Description
entityLabels

EntityLabelObject[]

예제 발화 내에서 식별된 엔터티입니다.

intentName

string

예제 발화를 나타내는 식별된 의도입니다.

text

string

발화 예제입니다.

응답

Name 형식 Description
201 Created

LabelExampleResponse

만든 예제 발화의 ID입니다.

Other Status Codes

ErrorResponse

오류 응답입니다.

보안

Ocp-Apim-Subscription-Key

형식: apiKey
In(다음 안에): header

예제

Successful Add Label request

샘플 요청

POST {Endpoint}/luis/api/v2.0/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/example


{
  "text": "whats the weather in buenos aires?",
  "intentName": "WeatherInPlace",
  "entityLabels": [
    {
      "entityName": "Place",
      "startCharIndex": 21,
      "endCharIndex": 34
    }
  ]
}

샘플 응답

{
  "UtteranceText": "whats the weather in buenos aires?",
  "ExampleId": -11
}

정의

Name Description
EntityLabelObject

예제 내에서 추출된 엔터티의 엔터티 형식 및 위치를 정의합니다.

ErrorResponse

API에서 작업을 호출할 때 오류 응답입니다.

ExampleLabelObject

레이블이 지정된 예제 발화입니다.

LabelExampleResponse

레이블이 지정된 예제 발화를 추가할 때 응답합니다.

EntityLabelObject

예제 내에서 추출된 엔터티의 엔터티 형식 및 위치를 정의합니다.

Name 형식 Description
endCharIndex

integer

추출된 엔터티가 끝나는 발화 내의 인덱스입니다.

entityName

string

엔터티 형식입니다.

role

string

발화 내에서 엔터티의 역할입니다.

startCharIndex

integer

추출된 엔터티가 시작되는 발화 내의 인덱스입니다.

ErrorResponse

API에서 작업을 호출할 때 오류 응답입니다.

Name 형식 Description
errorType

string

ExampleLabelObject

레이블이 지정된 예제 발화입니다.

Name 형식 Description
entityLabels

EntityLabelObject[]

예제 발화 내에서 식별된 엔터티입니다.

intentName

string

예제 발화를 나타내는 식별된 의도입니다.

text

string

발화 예제입니다.

LabelExampleResponse

레이블이 지정된 예제 발화를 추가할 때 응답합니다.

Name 형식 Description
ExampleId

integer (int64)

새로 만든 예제 ID입니다.

UtteranceText

string

발화 예제입니다.