Skip to content

Commit

Permalink
Kyled/async functions (#2506)
Browse files Browse the repository at this point in the history
* Fix string that was missed in PR #2476

* Remove async suffix from functions in internal classes
  • Loading branch information
Kyle Delaney authored Jul 28, 2020
1 parent 4f1480d commit 8a06762
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion libraries/botbuilder-ai/src/luisRecognizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export class LuisRecognizer implements LuisRecognizerTelemetryClient {
entities: {},
});
} else {
recognizerPromise = luisRecognizer.recognizeInternalAsync(context);
recognizerPromise = luisRecognizer.recognizeInternal(context);
}

return recognizerPromise
Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder-ai/src/luisRecognizerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ export abstract class LuisRecognizerInternal {

application: LuisApplication;

abstract recognizeInternalAsync(context: TurnContext): Promise<RecognizerResult>;
abstract recognizeInternal(context: TurnContext): Promise<RecognizerResult>;

}
2 changes: 1 addition & 1 deletion libraries/botbuilder-ai/src/luisRecognizerOptionsV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class LuisRecognizerV2 extends LuisRecognizerInternal {

private luisClient: LuisClient;

async recognizeInternalAsync(context: TurnContext): Promise<RecognizerResult> {
async recognizeInternal(context: TurnContext): Promise<RecognizerResult> {
const luisPredictionOptions = this.options;
const utterance: string = context.activity.text || '';

Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder-ai/src/luisRecognizerOptionsV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class LuisRecognizerV3 extends LuisRecognizerInternal {

public predictionOptions: LuisRecognizerOptionsV3;

async recognizeInternalAsync(context: TurnContext): Promise<RecognizerResult> {
async recognizeInternal(context: TurnContext): Promise<RecognizerResult> {
const utterance: string = context.activity.text || '';
if (!utterance.trim()) {
// Bypass LUIS if the activity's text is null or whitespace
Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder-ai/src/qnaMaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export class QnAMaker implements QnAMakerTelemetryClient {
* @param feedbackRecords Feedback records.
*/
public async callTrainAsync(feedbackRecords: FeedbackRecords) {
return await this.trainUtils.callTrainAsync(feedbackRecords);
return await this.trainUtils.callTrain(feedbackRecords);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions libraries/botbuilder-ai/src/qnamaker-utils/trainUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class TrainUtils {
* Train API to provide feedback.
* @param feedbackRecords Feedback record list.
*/
public async callTrainAsync(feedbackRecords: FeedbackRecords) {
public async callTrain(feedbackRecords: FeedbackRecords) {
if (!feedbackRecords) {
throw new TypeError('Feedback records can not be null.');
}
Expand All @@ -41,10 +41,10 @@ export class TrainUtils {
return;
}

await this.queryTrainAsync(feedbackRecords);
await this.queryTrain(feedbackRecords);
}

private async queryTrainAsync(feedbackRecords: FeedbackRecords) {
private async queryTrain(feedbackRecords: FeedbackRecords) {
const url: string = `${ this.endpoint.host }/knowledgebases/${ this.endpoint.knowledgeBaseId }/train`;
var payloadBody = JSON.stringify({
feedbackRecords: feedbackRecords
Expand Down
2 changes: 1 addition & 1 deletion libraries/teams-scenarios/taskModule/src/taskModuleBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class TaskModuleBot extends TeamsActivityHandler {
}

protected async handleTeamsTaskModuleSubmit(context: TurnContext, taskModuleRequest: TaskModuleRequest): Promise<TaskModuleResponse> {
var reply = MessageFactory.text("handleTeamsTaskModuleFetchAsync Value: " + JSON.stringify(taskModuleRequest));
var reply = MessageFactory.text("handleTeamsTaskModuleSubmit Value: " + JSON.stringify(taskModuleRequest));
await context.sendActivity(reply);

return {
Expand Down

0 comments on commit 8a06762

Please sign in to comment.