Versions - Import
Importuje novou verzi do aplikace LUIS.
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/import
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/import?versionId={versionId}
Parametry identifikátoru URI
Name | V | Vyžadováno | Typ | Description |
---|---|---|---|---|
app
|
path | True |
string uuid |
ID aplikace. |
Endpoint
|
path | True |
string |
Podporované koncové body služeb Cognitive Services (protokol a název hostitele, například: https://westus.api.cognitive.microsoft.com). |
version
|
query |
string |
Nové id verze, které se mají importovat. Pokud není zadáno, bude id verze načteno z importovaného objektu. |
Hlavička požadavku
Name | Vyžadováno | Typ | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Text požadavku
Name | Typ | Description |
---|---|---|
closedLists |
Seznam entit seznamu |
|
composites |
Seznam složených entit |
|
culture |
string |
Jazyková verze aplikace. Např.: en-us. |
desc |
string |
Popis aplikace. |
entities |
Seznam entit |
|
intents |
Seznam záměrů. |
|
model_features |
Seznam funkcí modelu |
|
name |
string |
Název aplikace |
patternAnyEntities |
Seznam entit Pattern.Any |
|
patterns |
Seznam vzorů |
|
prebuiltEntities |
Seznam předem připravených entit |
|
regex_entities |
Seznam entit regulárních výrazů |
|
regex_features |
Seznam funkcí vzorů |
|
utterances |
Seznam ukázkových promluv |
|
versionId |
string |
ID verze aplikace, která byla exportována. |
Odpovědi
Name | Typ | Description |
---|---|---|
201 Created |
string |
Verze vytvořené aplikace. |
Other Status Codes |
Odpověď na chybu. |
Zabezpečení
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Příklady
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"
Definice
Name | Description |
---|---|
Closed |
Exportovaný model – entita seznamu. |
Error |
Při vyvolání operace v rozhraní API se zobrazí chybová odpověď. |
Hierarchical |
|
JSONEntity |
Exportovaný model – extrahovaná entita z promluvy. |
JSONModel |
Exportovaný model – funkce modelu seznamu frází. |
JSONRegex |
Exportovaný model – funkce vzoru. |
JSONUtterance |
Exportovaný model – promluva, která se použila k trénování modelu. |
Luis |
Exportovaný model – exportovaná aplikace LUIS. |
Pattern |
Pattern.Any Entity Extractor. |
Pattern |
Vzor |
Prebuilt |
|
Prebuilt |
Předem připravený extraktor entit. |
Regex |
Extraktor entit regulárního výrazu. |
Sub |
Podseznam položek pro entitu seznamu. |
ClosedList
Exportovaný model – entita seznamu.
Name | Typ | Description |
---|---|---|
name |
string |
Název entity seznamu |
roles |
string[] |
|
subLists |
Podseznamy entity seznamu. |
ErrorResponse
Při vyvolání operace v rozhraní API se zobrazí chybová odpověď.
Name | Typ | Description |
---|---|---|
errorType |
string |
HierarchicalModel
Name | Typ | Description |
---|---|---|
children |
string[] |
|
inherits | ||
name |
string |
|
roles |
string[] |
JSONEntity
Exportovaný model – extrahovaná entita z promluvy.
Name | Typ | Description |
---|---|---|
endPos |
integer |
Index v promluvě, kde extrahovaná entita končí. |
entity |
string |
Název entity. |
role |
string |
Role entity v promluvě. |
startPos |
integer |
Index v promluvě, kde začíná extrahovaná entita. |
JSONModelFeature
Exportovaný model – funkce modelu seznamu frází.
Name | Typ | Description |
---|---|---|
activated |
boolean |
Označuje, jestli je funkce povolená. |
mode |
boolean |
Funkce zaměnitelného seznamu frází slouží jako seznam synonym pro trénování. Seznam nevyměnitelných frází slouží jako samostatné funkce pro trénování. Pokud tedy seznam nezaměnitelných frází obsahuje 5 frází, namapují se na 5 samostatných funkcí. Seznam nezaměnitelných frází si můžete představit jako další balíček slov, který přidáte do existujících funkcí slovníku luis. Používá se jako funkce vyhledávání lexikonu, kde její hodnota je 1, pokud lexikon obsahuje dané slovo, nebo 0, pokud ne. Výchozí hodnota je true (pravda). |
name |
string |
Název seznamu frází. |
words |
string |
Seznam frází oddělených čárkami, které představují seznam frází. |
JSONRegexFeature
Exportovaný model – funkce vzoru.
Name | Typ | Description |
---|---|---|
activated |
boolean |
Označuje, jestli je povolená funkce Vzor. |
name |
string |
Název funkce |
pattern |
string |
Regulární výraz, který se má shodovat. |
JSONUtterance
Exportovaný model – promluva, která se použila k trénování modelu.
Name | Typ | Description |
---|---|---|
entities |
Odpovídající entity. |
|
intent |
string |
Odpovídající záměr. |
text |
string |
Promluva. |
LuisApp
Exportovaný model – exportovaná aplikace LUIS.
Name | Typ | Description |
---|---|---|
closedLists |
Seznam entit seznamu |
|
composites |
Seznam složených entit |
|
culture |
string |
Jazyková verze aplikace. Např.: en-us. |
desc |
string |
Popis aplikace. |
entities |
Seznam entit |
|
intents |
Seznam záměrů. |
|
model_features |
Seznam funkcí modelu |
|
name |
string |
Název aplikace |
patternAnyEntities |
Seznam entit Pattern.Any |
|
patterns |
Seznam vzorů |
|
prebuiltEntities |
Seznam předem připravených entit |
|
regex_entities |
Seznam entit regulárních výrazů |
|
regex_features |
Seznam funkcí vzorů |
|
utterances |
Seznam ukázkových promluv |
|
versionId |
string |
ID verze aplikace, která byla exportována. |
PatternAny
Pattern.Any Entity Extractor.
Name | Typ | Description |
---|---|---|
explicitList |
string[] |
|
name |
string |
|
roles |
string[] |
PatternRule
Vzor
Name | Typ | Description |
---|---|---|
intent |
string |
Název záměru, do kterého vzor patří. |
pattern |
string |
Vzor textu. |
PrebuiltDomainObject
Name | Typ | Description |
---|---|---|
domain_name |
string |
|
model_name |
string |
PrebuiltEntity
Předem připravený extraktor entit.
Name | Typ | Description |
---|---|---|
name |
string |
|
roles |
string[] |
RegexEntity
Extraktor entit regulárního výrazu.
Name | Typ | Description |
---|---|---|
name |
string |
|
regexPattern |
string |
|
roles |
string[] |
SubClosedList
Podseznam položek pro entitu seznamu.
Name | Typ | Description |
---|---|---|
canonicalForm |
string |
Standardní formulář, který seznam představuje. |
list |
string[] |
Seznam synonym. |