你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Apps - Import
Imports an application to LUIS, the application's structure is included in the request body.
POST {Endpoint}/luis/authoring/v3.0-preview/apps/import
POST {Endpoint}/luis/authoring/v3.0-preview/apps/import?appName={appName}
Name | In | Required | Type | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). |
app
|
query |
string |
The application name to create. If not specified, the application name will be read from the imported object. If the application name already exists, an error is returned. |
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Name | Type | Description |
---|---|---|
closedLists |
List of list entities. |
|
composites |
List of composite entities. |
|
culture |
string |
The culture of the application. E.g.: en-us. |
desc |
string |
The description of the application. |
entities |
List of entities. |
|
hierarchicals |
List of hierarchical entities. |
|
intents |
List of intents. |
|
name |
string |
The name of the application. |
patternAnyEntities |
List of Pattern.Any entities. |
|
patterns |
List of patterns. |
|
phraselists |
List of model features. |
|
prebuiltEntities |
List of prebuilt entities. |
|
regex_entities |
List of regular expression entities. |
|
regex_features |
List of pattern features. |
|
utterances |
List of example utterances. |
|
versionId |
string |
The version ID of the application that was exported. |
Name | Type | Description |
---|---|---|
201 Created |
string |
The ID of the imported application. |
Other Status Codes |
Error Response. |
Type:
apiKey
In:
header
Sample request
POST {Endpoint}/luis/authoring/v3.0-preview/apps/import?appName=Test LUIS App
{
"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/apps/374fac89-ae12-4afd-8c21-8a6424ce1c1f
"374fac89-ae12-4afd-8c21-8a6424ce1c1f"
Name | Description |
---|---|
Closed |
Exported Model - A list entity. |
Error |
Error response when invoking an operation on the API. |
Hierarchical |
|
Json |
|
JSONEntity |
Exported Model - Extracted Entity from utterance. |
JSONModel |
Exported Model - Phraselist Model Feature. |
Json |
An object containing the model feature information either the model name or feature name. |
JSONRegex |
Exported Model - A Pattern feature. |
JSONUtterance |
Exported Model - Utterance that was used to train the model. |
Luis |
Exported Model - An exported LUIS Application. |
Pattern |
Pattern.Any Entity Extractor. |
Pattern |
Pattern |
Prebuilt |
|
Prebuilt |
Prebuilt Entity Extractor. |
Regex |
Regular Expression Entity Extractor. |
Sub |
Sublist of items for a list entity. |
Exported Model - A list entity.
Name | Type | Description |
---|---|---|
name |
string |
Name of the list entity. |
roles |
string[] |
|
subLists |
Sublists for the list entity. |
Error response when invoking an operation on the API.
Name | Type | Description |
---|---|---|
errorType |
string |
Name | Type | Description |
---|---|---|
children | ||
features |
An object containing the model feature information either the model name or feature name. |
|
inherits | ||
name |
string |
|
roles |
string[] |
Name | Type | Description |
---|---|---|
children | ||
features |
An object containing the model feature information either the model name or feature name. |
|
instanceOf |
string |
|
name |
string |
Exported Model - Extracted Entity from utterance.
Name | Type | Description |
---|---|---|
children |
Exported Model - Extracted Entity from utterance. |
|
endPos |
integer |
The index within the utterance where the extracted entity ends. |
entity |
string |
The entity name. |
role |
string |
The role the entity plays in the utterance. |
startPos |
integer |
The index within the utterance where the extracted entity starts. |
Exported Model - Phraselist Model Feature.
Name | Type | Default value | Description |
---|---|---|---|
activated |
boolean |
Indicates if the feature is enabled. |
|
enabledForAllModels |
boolean |
True |
Indicates if the Phraselist is enabled for all models in the application. |
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. |
An object containing the model feature information either the model name or feature name.
Name | Type | Description |
---|---|---|
featureName |
string |
The name of the feature used. |
modelName |
string |
The name of the model used. |
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. |
Exported Model - Utterance that was used to train the model.
Name | Type | Description |
---|---|---|
entities |
The matched entities. |
|
intent |
string |
The matched intent. |
text |
string |
The utterance. |
Exported Model - An exported LUIS Application.
Name | Type | Description |
---|---|---|
closedLists |
List of list entities. |
|
composites |
List of composite entities. |
|
culture |
string |
The culture of the application. E.g.: en-us. |
desc |
string |
The description of the application. |
entities |
List of entities. |
|
hierarchicals |
List of hierarchical entities. |
|
intents |
List of intents. |
|
name |
string |
The name of the application. |
patternAnyEntities |
List of Pattern.Any entities. |
|
patterns |
List of patterns. |
|
phraselists |
List of model features. |
|
prebuiltEntities |
List of prebuilt entities. |
|
regex_entities |
List of regular expression entities. |
|
regex_features |
List of pattern features. |
|
utterances |
List of example utterances. |
|
versionId |
string |
The version ID of the application that was exported. |
Pattern.Any Entity Extractor.
Name | Type | Description |
---|---|---|
explicitList |
string[] |
|
name |
string |
|
roles |
string[] |
Pattern
Name | Type | Description |
---|---|---|
intent |
string |
The intent's name where the pattern belongs to. |
pattern |
string |
The pattern text. |
Name | Type | Description |
---|---|---|
domain_name |
string |
|
model_name |
string |
Prebuilt Entity Extractor.
Name | Type | Description |
---|---|---|
name |
string |
|
roles |
string[] |
Regular Expression Entity Extractor.
Name | Type | Description |
---|---|---|
name |
string |
|
regexPattern |
string |
|
roles |
string[] |
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. |