mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Include LUIS app id
This commit is contained in:
parent
ec05cd1160
commit
cd3141fcf2
@ -158,8 +158,8 @@ class BotController extends Controller
|
|||||||
|
|
||||||
private function parseMessage($message)
|
private function parseMessage($message)
|
||||||
{
|
{
|
||||||
$appId = env('MSBOT_LUIS_APP_ID');
|
$appId = config('ninja.voice_commands.app_id');
|
||||||
$subKey = env('MSBOT_LUIS_SUBSCRIPTION_KEY');
|
$subKey = config('ninja.voice_commands.subscription_key');
|
||||||
$message = rawurlencode($message);
|
$message = rawurlencode($message);
|
||||||
|
|
||||||
$url = sprintf('%s/%s?subscription-key=%s&verbose=true&q=%s', MSBOT_LUIS_URL, $appId, $subKey, $message);
|
$url = sprintf('%s/%s?subscription-key=%s&verbose=true&q=%s', MSBOT_LUIS_URL, $appId, $subKey, $message);
|
||||||
|
@ -30,4 +30,10 @@ return [
|
|||||||
'google_maps_enabled' => env('GOOGLE_MAPS_ENABLED', true),
|
'google_maps_enabled' => env('GOOGLE_MAPS_ENABLED', true),
|
||||||
'google_maps_api_key' => env('GOOGLE_MAPS_API_KEY', ''),
|
'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'),
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -117,14 +117,11 @@ You can disable the feature by adding ``GOOGLE_MAPS_ENABLED=false`` to the .env
|
|||||||
Voice Commands
|
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>`_.
|
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.
|
||||||
|
|
||||||
You'll also need to set the following values in the .env file.
|
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
SPEECH_ENABLED=true
|
SPEECH_ENABLED=true
|
||||||
MSBOT_LUIS_APP_ID=...
|
|
||||||
MSBOT_LUIS_SUBSCRIPTION_KEY=...
|
MSBOT_LUIS_SUBSCRIPTION_KEY=...
|
||||||
|
|
||||||
Lock Invoices
|
Lock Invoices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user