Include LUIS app id

This commit is contained in:
Hillel Coren 2018-04-11 12:54:34 +03:00
parent ec05cd1160
commit cd3141fcf2
3 changed files with 9 additions and 6 deletions

View File

@ -158,8 +158,8 @@ class BotController extends Controller
private function parseMessage($message)
{
$appId = env('MSBOT_LUIS_APP_ID');
$subKey = env('MSBOT_LUIS_SUBSCRIPTION_KEY');
$appId = config('ninja.voice_commands.app_id');
$subKey = config('ninja.voice_commands.subscription_key');
$message = rawurlencode($message);
$url = sprintf('%s/%s?subscription-key=%s&verbose=true&q=%s', MSBOT_LUIS_URL, $appId, $subKey, $message);

View File

@ -30,4 +30,10 @@ return [
'google_maps_enabled' => env('GOOGLE_MAPS_ENABLED', true),
'google_maps_api_key' => env('GOOGLE_MAPS_API_KEY', ''),
// Voice commands
'voice_commands' => [
'app_id' => env('MSBOT_LUIS_APP_ID', 'ea1cda29-5994-47c4-8c25-2b58ae7ae7a8'),
'subscription_key' => env('MSBOT_LUIS_SUBSCRIPTION_KEY'),
],
];

View File

@ -117,14 +117,11 @@ You can disable the feature by adding ``GOOGLE_MAPS_ENABLED=false`` to the .env
Voice Commands
""""""""""""""
Supporting voice commands requires creating a `LUIS.ai <https://www.luis.ai/home/index>`_ app, once the app is created you can import this `model file <https://download.invoiceninja.com/luis.json>`_.
You'll also need to set the following values in the .env file.
Supporting voice commands requires creating a `LUIS.ai subscription key <https://docs.microsoft.com/en-us/azure/cognitive-services/luis/azureibizasubscription>`_, then set the following values in the .env file.
.. code-block:: shell
SPEECH_ENABLED=true
MSBOT_LUIS_APP_ID=...
MSBOT_LUIS_SUBSCRIPTION_KEY=...
Lock Invoices