Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit e273974

Browse files
author
JSpru
authored
Adding 'endpoint' to config init (#411)
* Adding 'endpoint' to config init * Format query response json * Remove success message after output export to console
1 parent 7007637 commit e273974

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/luis/src/commands/luis/application/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default class LuisApplicationQuery extends Command {
7171

7272
try {
7373
const predictionData = await client.predictionOperations.getSlotPrediction(appId, slotName, predictionRequest, options)
74-
this.log(`Successfully fetched prediction data ${JSON.stringify(predictionData)}.`)
74+
this.log(`Successfully fetched prediction data ${JSON.stringify(predictionData, null, 2)}.`)
7575
} catch (err) {
7676
throw new CLIError(`Failed to fetch prediction data: ${err}`)
7777
}

packages/luis/src/commands/luis/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class LuisInit extends Command {
2020
subscriptionKey: flags.string({description: 'LUIS cognitive services subscription key (aka Ocp-Apim-Subscription-Key)'}),
2121
appId: flags.string({description: 'LUIS application Id'}),
2222
versionId: flags.string({description: 'LUIS version Id'}),
23-
region: flags.string({description: 'LUIS application region. Will be prepended to endpoint hostname: <region>.api.cognitive.microsoft.com. Available Regions: westus, westeurope, australiaeast'}),
23+
endpoint: flags.string({description: 'LUIS application endpoint hostname, ex: <region>.api.cognitive.microsoft.com'}),
2424
}
2525

2626
async run() {

packages/luis/src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const isDirectory = (path: string): boolean => {
7575
}
7676

7777
const filterByAllowedConfigValues = (configObj: any, prefix: string) => {
78-
const allowedConfigValues = [`${prefix}appId`, `${prefix}region`, `${prefix}subscriptionKey`, `${prefix}versionId`]
78+
const allowedConfigValues = [`${prefix}appId`, `${prefix}endpoint`, `${prefix}region`, `${prefix}subscriptionKey`, `${prefix}versionId`]
7979
const filtered = Object.keys(configObj)
8080
.filter(key => allowedConfigValues.includes(key))
8181
.reduce((filteredConfigObj: any, key) => {

0 commit comments

Comments
 (0)