Skip to content

Commit b231a34

Browse files
authored
LuisRecognizer refactor and addition of V3 endpoint (#1479)
* LuisRecognizer refactor and addition of V3 endpoint * Fixing PR feedback * Adding missing file header * Adding tests to V3 scenarios
1 parent 5a1ebc2 commit b231a34

22 files changed

+7279
-353
lines changed

libraries/botbuilder-ai/src/luisRecognizer.ts

Lines changed: 165 additions & 351 deletions
Large diffs are not rendered by default.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* @module botbuilder-ai
3+
*/
4+
/**
5+
* Copyright (c) Microsoft Corporation. All rights reserved.
6+
* Licensed under the MIT License.
7+
*/
8+
9+
import {LuisApplication, LuisRecognizerOptions} from './luisRecognizer'
10+
import { RecognizerResult, TurnContext } from 'botbuilder-core';
11+
12+
export abstract class LuisRecognizerInternal {
13+
14+
constructor(application: LuisApplication, options?: LuisRecognizerOptions)
15+
{
16+
if (!application) {
17+
throw new Error('Null Application\n');
18+
}
19+
this.application = application;
20+
this.application.endpoint = this.application.endpoint ? this.application.endpoint : 'https://westus.api.cognitive.microsoft.com';
21+
}
22+
23+
application: LuisApplication;
24+
25+
abstract recognizeInternalAsync(context: TurnContext): Promise<RecognizerResult>;
26+
27+
}

0 commit comments

Comments
 (0)