Search code examples
botframeworkbing

How to integrate bing spell-check key in microsoft botframework v4 along with other keys?


Even though i add the bing spell check key along with other keys in the .bot file, its not working .

Is there a way you could integrate the key in v4?


Solution

  • You can use the Spell Check Middleware provided by the Bot Builder Community.

    For C#:

    To use it, you have to add the Service in the declaration:

    services.AddBot<Bot>((options) => {
        options.CredentialProvider = new ConfigurationCredentialProvider(Configuration);
    
        // more middleware
        options.Middleware.Add(new SpellCheckMiddleware(Configuration));
    });
    

    And your configuration must include:

    {
      "SpellCheckKey": "<YOUR SPELL CHECK KEY HERE>",
      "SpellCheckCountryCode": "sv",
      "SpellCheckMarket": "sv-SE" 
    }
    

    See the source page for more details on how to use it


    For Node.js: