openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 10.3 kB
JSON
{"openapi":"3.0.0","info":{"title":"Language Understanding Intelligent Service (LUIS) Endpoint API for running predictions and extracting user intentions and entities from utterances.","version":"v2.0 preview","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/LUIS/Runtime/stable/v2.0/LUIS-Runtime.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"cognitiveservices-LUIS-Runtime","x-tags":["Azure","Microsoft"]},"security":[{"apiKeyHeader":[]}],"paths":{"/{appId}":{"get":{"description":"Gets predictions for a given utterance, in the form of intents and entities. The current maximum query size is 500 characters.","operationId":"Prediction_Resolve2","parameters":[{"description":"The LUIS application ID (guid).","in":"path","name":"appId","required":true,"schema":{"type":"string"},"examples":{"Successful Get Predictions From Endpoint Via Get request":{"value":"{Application Id}"}}},{"description":"The utterance to predict.","in":"query","name":"q","required":true,"x-ms-client-name":"query","schema":{"type":"string","maxLength":500},"examples":{"Successful Get Predictions From Endpoint Via Get request":{"value":"forward to frank 30 dollars through HSBC"}}},{"description":"The timezone offset for the location of the request.","in":"query","name":"timezoneOffset","schema":{"type":"number"}},{"description":"If true, return all intents instead of just the top scoring intent.","in":"query","name":"verbose","schema":{"type":"boolean"}},{"description":"Use the staging endpoint slot.","in":"query","name":"staging","schema":{"type":"boolean"}},{"description":"Enable spell checking.","in":"query","name":"spellCheck","schema":{"type":"boolean"}},{"description":"The subscription key to use when enabling bing spell check","in":"query","name":"bing-spell-check-subscription-key","schema":{"type":"string"}},{"description":"Log query (default is true)","in":"query","name":"log","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Prediction, based on the input query, containing intent(s) and entities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LuisResult"},"examples":{"Successful Get Predictions From Endpoint Via Get request":{"$ref":"#/components/examples/Successful_Get_Predictions_From_Endpoint_Via_Get_request"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}}}}},"post":{"description":"Gets predictions for a given utterance, in the form of intents and entities. The current maximum query size is 500 characters.","operationId":"Prediction_Resolve","parameters":[{"description":"The LUIS application ID (Guid).","in":"path","name":"appId","required":true,"schema":{"type":"string"},"examples":{"Successful Get Predictions From Endpoint Via Post request":{"value":"{Application Id}"}}},{"description":"The timezone offset for the location of the request.","in":"query","name":"timezoneOffset","schema":{"type":"number"}},{"description":"If true, return all intents instead of just the top scoring intent.","in":"query","name":"verbose","schema":{"type":"boolean"}},{"description":"Use the staging endpoint slot.","in":"query","name":"staging","schema":{"type":"boolean"}},{"description":"Enable spell checking.","in":"query","name":"spellCheck","schema":{"type":"boolean"}},{"description":"The subscription key to use when enabling bing spell check","in":"query","name":"bing-spell-check-subscription-key","schema":{"type":"string"}},{"description":"Log query (default is true)","in":"query","name":"log","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Q"}}},"description":"The utterance to predict.","required":true,"x-ms-client-name":"query"},"responses":{"200":{"description":"Prediction, based on the input query, containing intent(s) and entities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LuisResult"},"examples":{"Successful Get Predictions From Endpoint Via Post request":{"$ref":"#/components/examples/Successful_Get_Predictions_From_Endpoint_Via_Post_request"}}}}},"default":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIError"}}}}}}}},"servers":[{"url":"https://azure.local/luis/v2.0/apps"},{"url":"https://{AzureRegion}.api.cognitive.microsoft.com/luis/v2.0/apps","variables":{"AzureRegion":{"description":"Supported Azure regions for Cognitive Services endpoints","enum":["westus","westeurope","southeastasia","eastus2","westcentralus","westus2","eastus","southcentralus","northeurope","eastasia","australiaeast","brazilsouth"],"x-ms-enum":{"modelAsString":false,"name":"AzureRegions"},"x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"default":"westus"}}}],"components":{"examples":{"Successful_Get_Predictions_From_Endpoint_Via_Get_request":{"value":{"entities":[{"endIndex":18,"entity":"30","resolution":{"value":"30"},"startIndex":17,"type":"builtin.number"},{"endIndex":15,"entity":"frank","score":0.935219169,"startIndex":11,"type":"frank"},{"endIndex":26,"entity":"30 dollars","resolution":{"unit":"Dollar","value":"30"},"startIndex":17,"type":"builtin.currency"},{"endIndex":39,"entity":"hsbc","resolution":{"values":["BankeName"]},"startIndex":36,"type":"Bank"}],"query":"forward to frank 30 dollars through HSBC","sentimentAnalysis":{"label":"positive","score":0.9163064},"topScoringIntent":{"intent":"give","score":0.3964121}}},"Successful_Get_Predictions_From_Endpoint_Via_Post_request":{"value":{"entities":[{"endIndex":18,"entity":"30","resolution":{"value":"30"},"startIndex":17,"type":"builtin.number"},{"endIndex":15,"entity":"frank","score":0.935219169,"startIndex":11,"type":"frank"},{"endIndex":26,"entity":"30 dollars","resolution":{"unit":"Dollar","value":"30"},"startIndex":17,"type":"builtin.currency"},{"endIndex":39,"entity":"hsbc","resolution":{"values":["BankeName"]},"startIndex":36,"type":"Bank"}],"query":"forward to frank 30 dollars through HSBC","sentimentAnalysis":{"label":"positive","score":0.9163064},"topScoringIntent":{"intent":"give","score":0.3964121}}}},"securitySchemes":{"apiKeyHeader":{"in":"header","name":"Ocp-Apim-Subscription-Key","type":"apiKey"}},"schemas":{"APIError":{"description":"Error information returned by the API","properties":{"message":{"description":"Cause of the error.","type":"string"},"statusCode":{"description":"HTTP Status code","type":"string"}},"type":"object"},"CompositeChildModel":{"description":"Child entity in a LUIS Composite Entity.","properties":{"type":{"description":"Type of child entity.","type":"string"},"value":{"description":"Value extracted by LUIS.","type":"string"}},"required":["type","value"],"type":"object"},"CompositeEntityModel":{"description":"LUIS Composite Entity.","properties":{"children":{"description":"Child entities.","items":{"$ref":"#/components/schemas/CompositeChildModel"},"type":"array"},"parentType":{"description":"Type/name of parent entity.","type":"string"},"value":{"description":"Value for composite entity extracted by LUIS.","type":"string"}},"required":["parentType","value","children"],"type":"object"},"EntityModel":{"additionalProperties":{"description":"List of additional properties. E.g.: score and resolution values for pre-built LUIS entities.","type":"object"},"description":"An entity extracted from the utterance.","properties":{"endIndex":{"description":"The position of the last character of the matched entity within the utterance.","type":"number"},"entity":{"description":"Name of the entity, as defined in LUIS.","type":"string"},"startIndex":{"description":"The position of the first character of the matched entity within the utterance.","type":"number"},"type":{"description":"Type of the entity, as defined in LUIS.","type":"string"}},"required":["entity","type","startIndex","endIndex"],"type":"object"},"EntityWithResolution":{"allOf":[{"$ref":"#/components/schemas/EntityModel"},{"properties":{"resolution":{"description":"Resolution values for pre-built LUIS entities.","type":"object"}},"required":["resolution"],"type":"object"}]},"EntityWithScore":{"allOf":[{"$ref":"#/components/schemas/EntityModel"},{"properties":{"score":{"description":"Associated prediction score for the intent (float).","maximum":1,"minimum":0,"type":"number"}},"required":["score"],"type":"object"}]},"IntentModel":{"description":"An intent detected from the utterance.","properties":{"intent":{"description":"Name of the intent, as defined in LUIS.","type":"string"},"score":{"description":"Associated prediction score for the intent (float).","maximum":1,"minimum":0,"type":"number"}},"type":"object"},"LuisResult":{"description":"Prediction, based on the input query, containing intent(s) and entities.","properties":{"alteredQuery":{"description":"The corrected utterance (when spell checking was enabled).","type":"string"},"compositeEntities":{"description":"The composite entities extracted from the utterance.","items":{"$ref":"#/components/schemas/CompositeEntityModel"},"type":"array"},"entities":{"description":"The entities extracted from the utterance.","items":{"$ref":"#/components/schemas/EntityModel"},"type":"array"},"intents":{"description":"All the intents (and their score) that were detected from utterance.","items":{"$ref":"#/components/schemas/IntentModel"},"type":"array"},"query":{"description":"The input utterance that was analized.","type":"string"},"sentimentAnalysis":{"$ref":"#/components/schemas/Sentiment"},"topScoringIntent":{"$ref":"#/components/schemas/IntentModel"}},"type":"object"},"Q":{"description":"The utterance to predict.","example":"\"forward to frank 30 dollars through HSBC\"","maxLength":500,"type":"string"},"Sentiment":{"description":"Sentiment of the input utterance.","properties":{"label":{"description":"The polarity of the sentiment, can be positive, neutral or negative.","type":"string"},"score":{"description":"Score of the sentiment, ranges from 0 (most negative) to 1 (most positive).","type":"number"}},"type":"object"}}}}