fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
3 changed files with 5 additions and 1 deletions
Showing only changes of commit b1359bbf09 - Show all commits

View file

@ -770,6 +770,7 @@ export class GBMinService {
const key = min.instance.spellcheckerKey ? min.instance.spellcheckerKey : min.instance.spellcheckerKey;
if (key) {
text = text.charAt(0).toUpperCase() + text.slice(1);
const data = await AzureText.getSpelledText(min.instance.spellcheckerKey, text);
if (data !== text) {
GBLog.info(`Spelling corrected: ${data}`);

View file

@ -132,9 +132,10 @@ export class AskDialog extends IGBDialog {
const member = step.context.activity.from;
// Spells check the input text before translating.
text = text.charAt(0).toUpperCase() + text.slice(1);
const key = min.instance.spellcheckerKey ? min.instance.spellcheckerKey : min.instance.spellcheckerKey;
if (key) {
const data = await AzureText.getSpelledText(min.instance.spellcheckerKey, text);
if (data !== text) {
GBLog.info(`Spelling corrected (3): ${data}`);
@ -199,6 +200,7 @@ export class AskDialog extends IGBDialog {
const key = min.instance.spellcheckerKey ? minBoot.instance.spellcheckerKey : min.instance.spellcheckerKey;
if (key) {
text = text.charAt(0).toUpperCase() + text.slice(1);
const data = await AzureText.getSpelledText(min.instance.spellcheckerKey, text);
if (data !== text) {
GBLog.info(`Spelling corrected: ${data}`);

View file

@ -183,6 +183,7 @@ export class KBService implements IGBKBService {
query = query.replace('.', ' ');
query = query.replace('/', ' ');
query = query.replace('\\', ' ');
query = query.replace('\r\n', ' ');
if (subjects !== null) {
const text = KBService.getSubjectItemsSeparatedBySpaces(subjects);