次の方法で共有


Versions - Import

Imports a new version into a LUIS application.

POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/import
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/import?versionId={versionId}

URI Parameters

Name In Required Type Description
appId
path True

string

uuid

The application ID.

Endpoint
path True

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).

versionId
query

string

The new versionId to import. If not specified, the versionId will be read from the imported object.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Request Body

Name Type Description
closedLists

ClosedList[]

List of list entities.

composites

HierarchicalModel[]

List of composite entities.

culture

string

The culture of the application. E.g.: en-us.

desc

string

The description of the application.

entities

HierarchicalModel[]

List of entities.

intents

HierarchicalModel[]

List of intents.

model_features

JSONModelFeature[]

List of model features.

name

string

The name of the application.

patternAnyEntities

PatternAny[]

List of Pattern.Any entities.

patterns

PatternRule[]

List of patterns.

prebuiltEntities

PrebuiltEntity[]

List of prebuilt entities.

regex_entities

RegexEntity[]

List of regular expression entities.

regex_features

JSONRegexFeature[]

List of pattern features.

utterances

JSONUtterance[]

List of example utterances.

versionId

string

The version ID of the application that was exported.

Responses

Name Type Description
201 Created

string

The created application version.

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Import Application

Sample request

POST {Endpoint}/luis/api/v2.0/apps/bd72e8d7-62b8-48f5-9dcb-e3b0588b803a/versions/import?versionId=0.2


{
  "luis_schema_version": "3.0.0",
  "versionId": "0.1",
  "name": "LuisBot",
  "desc": "",
  "culture": "en-us",
  "intents": [
    {
      "name": "HomeAutomation.TurnOff",
      "inherits": {
        "domain_name": "HomeAutomation",
        "model_name": "TurnOff"
      }
    },
    {
      "name": "dateintent"
    },
    {
      "name": "Help"
    },
    {
      "name": "None"
    },
    {
      "name": "SearchHotels"
    },
    {
      "name": "ShowHotelsReviews"
    }
  ],
  "entities": [
    {
      "name": "AirportCode",
      "roles": [
        "destination"
      ]
    },
    {
      "name": "Hotel",
      "roles": []
    }
  ],
  "composites": [],
  "closedLists": [],
  "patternAnyEntities": [
    {
      "name": "patternAny1",
      "explicitList": [],
      "roles": [
        "role1",
        "role2"
      ]
    }
  ],
  "regex_entities": [
    {
      "name": "regex1",
      "regexPattern": "[^a]+",
      "roles": [
        "regex role"
      ]
    }
  ],
  "prebuiltEntities": [
    {
      "name": "datetimeV2",
      "roles": [
        "datetime role"
      ]
    }
  ],
  "model_features": [
    {
      "name": "Near",
      "mode": true,
      "words": "near,around,close,nearby",
      "activated": true
    },
    {
      "name": "Show",
      "mode": true,
      "words": "show,find,look,search",
      "activated": true
    }
  ],
  "regex_features": [
    {
      "name": "AirportCodeRegex",
      "pattern": "[a-z]{3}",
      "activated": true
    }
  ],
  "patterns": [
    {
      "pattern": "this is [a test] {patternAny1:role1}",
      "intent": "Help"
    }
  ],
  "utterances": [
    {
      "text": "i need help",
      "intent": "Help",
      "entities": []
    },
    {
      "text": "help me",
      "intent": "Help",
      "entities": []
    },
    {
      "text": "tomorrow",
      "intent": "dateintent",
      "entities": []
    },
    {
      "text": "search for hotels in seattle",
      "intent": "SearchHotels",
      "entities": []
    },
    {
      "text": "what can i do?",
      "intent": "Help",
      "entities": []
    },
    {
      "text": "next monday",
      "intent": "dateintent",
      "entities": []
    },
    {
      "text": "next year",
      "intent": "dateintent",
      "entities": []
    },
    {
      "text": "look for hotels in miami",
      "intent": "SearchHotels",
      "entities": []
    },
    {
      "text": "show me hotels in california",
      "intent": "SearchHotels",
      "entities": []
    },
    {
      "text": "show me the reviews of the amazing bot resort",
      "intent": "ShowHotelsReviews",
      "entities": [
        {
          "entity": "Hotel",
          "startPos": 23,
          "endPos": 44
        }
      ]
    },
    {
      "text": "can i see the reviews of extended bot hotel?",
      "intent": "ShowHotelsReviews",
      "entities": [
        {
          "entity": "Hotel",
          "startPos": 25,
          "endPos": 42
        }
      ]
    },
    {
      "text": "find reviews of hotelxya",
      "intent": "ShowHotelsReviews",
      "entities": [
        {
          "entity": "Hotel",
          "startPos": 16,
          "endPos": 23
        }
      ]
    },
    {
      "text": "show me reviews of the amazing hotel",
      "intent": "ShowHotelsReviews",
      "entities": [
        {
          "entity": "Hotel",
          "startPos": 19,
          "endPos": 35
        }
      ]
    },
    {
      "text": "what are the available options?",
      "intent": "Help",
      "entities": []
    },
    {
      "text": "best hotels in seattle",
      "intent": "SearchHotels",
      "entities": []
    },
    {
      "text": "hotels in los angeles",
      "intent": "SearchHotels",
      "entities": []
    },
    {
      "text": "can you show me hotels from los angeles?",
      "intent": "SearchHotels",
      "entities": []
    },
    {
      "text": "can you show me the reviews of the amazing resort & hotel",
      "intent": "ShowHotelsReviews",
      "entities": [
        {
          "entity": "Hotel",
          "startPos": 31,
          "endPos": 56
        }
      ]
    },
    {
      "text": "what are the reviews of the hotel bot framework?",
      "intent": "ShowHotelsReviews",
      "entities": [
        {
          "entity": "Hotel",
          "startPos": 24,
          "endPos": 46
        }
      ]
    },
    {
      "text": "find hotels near eze",
      "intent": "SearchHotels",
      "entities": [
        {
          "entity": "AirportCode",
          "startPos": 17,
          "endPos": 19
        }
      ]
    },
    {
      "text": "where can i stay near nnn?",
      "intent": "SearchHotels",
      "entities": [
        {
          "entity": "AirportCode",
          "startPos": 22,
          "endPos": 24
        }
      ]
    },
    {
      "text": "show hotels near att airport",
      "intent": "SearchHotels",
      "entities": [
        {
          "entity": "AirportCode",
          "startPos": 17,
          "endPos": 19
        }
      ]
    },
    {
      "text": "find hotels near agl",
      "intent": "SearchHotels",
      "entities": [
        {
          "entity": "AirportCode",
          "startPos": 17,
          "endPos": 19
        }
      ]
    },
    {
      "text": "find hotels around eze airport",
      "intent": "SearchHotels",
      "entities": [
        {
          "entity": "AirportCode",
          "startPos": 19,
          "endPos": 21
        }
      ]
    },
    {
      "text": "01/7",
      "intent": "dateintent",
      "entities": []
    }
  ]
}

Sample response

Location: https://westus.api.cognitive.microsoft.com/luis/api/v2.0/bd72e8d7-62b8-48f5-9dcb-e3b0588b803a/versions/0.2
"0.2"

Definitions

Name Description
ClosedList

Exported Model - A list entity.

ErrorResponse

Error response when invoking an operation on the API.

HierarchicalModel
JSONEntity

Exported Model - Extracted Entity from utterance.

JSONModelFeature

Exported Model - Phraselist Model Feature.

JSONRegexFeature

Exported Model - A Pattern feature.

JSONUtterance

Exported Model - Utterance that was used to train the model.

LuisApp

Exported Model - An exported LUIS Application.

PatternAny

Pattern.Any Entity Extractor.

PatternRule

Pattern

PrebuiltDomainObject
PrebuiltEntity

Prebuilt Entity Extractor.

RegexEntity

Regular Expression Entity Extractor.

SubClosedList

Sublist of items for a list entity.

ClosedList

Exported Model - A list entity.

Name Type Description
name

string

Name of the list entity.

roles

string[]

subLists

SubClosedList[]

Sublists for the list entity.

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string

HierarchicalModel

Name Type Description
children

string[]

inherits

PrebuiltDomainObject

name

string

roles

string[]

JSONEntity

Exported Model - Extracted Entity from utterance.

Name Type Description
endPos

integer

The index within the utterance where the extracted entity ends.

entity

string

The entity name.

role

string

The role of the entity within the utterance.

startPos

integer

The index within the utterance where the extracted entity starts.

JSONModelFeature

Exported Model - Phraselist Model Feature.

Name Type Description
activated

boolean

Indicates if the feature is enabled.

mode

boolean

An interchangeable phrase list feature serves as a list of synonyms for training. A non-exchangeable phrase list serves as separate features for training. So, if your non-interchangeable phrase list contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-interchangeable phrase list as an additional bag of words to add to LUIS existing vocabulary features. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Default value is true.

name

string

The Phraselist name.

words

string

List of comma-separated phrases that represent the Phraselist.

JSONRegexFeature

Exported Model - A Pattern feature.

Name Type Description
activated

boolean

Indicates if the Pattern feature is enabled.

name

string

Name of the feature.

pattern

string

The Regular Expression to match.

JSONUtterance

Exported Model - Utterance that was used to train the model.

Name Type Description
entities

JSONEntity[]

The matched entities.

intent

string

The matched intent.

text

string

The utterance.

LuisApp

Exported Model - An exported LUIS Application.

Name Type Description
closedLists

ClosedList[]

List of list entities.

composites

HierarchicalModel[]

List of composite entities.

culture

string

The culture of the application. E.g.: en-us.

desc

string

The description of the application.

entities

HierarchicalModel[]

List of entities.

intents

HierarchicalModel[]

List of intents.

model_features

JSONModelFeature[]

List of model features.

name

string

The name of the application.

patternAnyEntities

PatternAny[]

List of Pattern.Any entities.

patterns

PatternRule[]

List of patterns.

prebuiltEntities

PrebuiltEntity[]

List of prebuilt entities.

regex_entities

RegexEntity[]

List of regular expression entities.

regex_features

JSONRegexFeature[]

List of pattern features.

utterances

JSONUtterance[]

List of example utterances.

versionId

string

The version ID of the application that was exported.

PatternAny

Pattern.Any Entity Extractor.

Name Type Description
explicitList

string[]

name

string

roles

string[]

PatternRule

Pattern

Name Type Description
intent

string

The intent's name where the pattern belongs to.

pattern

string

The pattern text.

PrebuiltDomainObject

Name Type Description
domain_name

string

model_name

string

PrebuiltEntity

Prebuilt Entity Extractor.

Name Type Description
name

string

roles

string[]

RegexEntity

Regular Expression Entity Extractor.

Name Type Description
name

string

regexPattern

string

roles

string[]

SubClosedList

Sublist of items for a list entity.

Name Type Description
canonicalForm

string

The standard form that the list represents.

list

string[]

List of synonym words.