Build StatusDeps StatusHex VersionJoin the chat at https://gitter.im/swelham/ms_luis

MsLuis

A small library that can send requests to the Microsoft LUIS service

Installation

Add ms_luis to your list of dependencies in mix.exs:

def deps do
  [{:ms_luis, "~> 2.0"}]
end

Usage

Firstly setup the :ms_luis config in your applications config file

config :ms_luis, :config,
  url: "https://westus.api.cognitive.microsoft.com",
  app_key: "<your-application-key>",
  sub_key: "<your-subscription-key>"

Then you can call the MsLuis.get_intent/1 function with the text you wish to get the intent for.

MsLuis.get_intent("turn off the lights")
# {:ok, %{"topScoringIntent" => "lights_off", ...}}