Giter Site home page Giter Site logo

elixir_wit's People

Contributors

jfayad avatar micahwedemeyer avatar tielur avatar zabirauf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

elixir_wit's Issues

Issue with Converse API

When sending this request to Wit:

curl -XPOST 'https://api.wit.ai/converse?&context=%7B%22theater%22:%22Edwards%20Mira%20Mesa%22,%22showTime%22:%22today%22,%22movie%22:%22Zootopia%22%7D&session_id=2241e696-44b7-11e7-8a47-6c4008a5c1c2&v=20160526' \
      -H "Content-Type: application/json" \
      -H "Accept: application/json" \
      -H 'Authorization: Bearer TOKEN'

I get this response:

{
  "confidence" : 1,
  "type" : "error"
}

It seems to be related to the context. If I change the request to this:

curl -XPOST 'https://api.wit.ai/converse?v=20170307&session_id=2241e696-44b7-11e7-8a47-6c4008a5c1c2&v=20160526' \
      -d '{"theater":"Edwards","showTime":"today","movie":"Zootopia"}' \
      -H "Content-Type: application/json" \
      -H "Accept: application/json" \
      -H 'Authorization: Bearer TOKEN'

I get the correct response:

{
  "confidence" : 0.00978581436765204,
  "type" : "msg",
  "msg" : "Zootopia is shown at Edwards at today"
}

Update :uuid deps to new version

If using this package in a project requiring modules that depend on the newest version of the :uuid module, the compilation will crash

Unchecked dependencies for environment dev:
* uuid (Hex package)
  could not find an app file at "_build/dev/lib/uuid/ebin/uuid.app". This may happen if the dependency was not yet compiled, or you specified the wrong application name in your deps, or the dependency indeed has no app file (then you can pass app: false as option)
** (Mix) Can't continue due to errors on dependencies

This is because the latest version of the module has been renamed to app: elixir_uuid yet the name is still UUID

to reproduce try to compile a project which depends on both elixir_wit and :guardian v0.14.6 and you'll be able to create the conflict on compilation.

Pass original message in custom actions

In your weather example, the defaction fetch_weather/2 receives session and context. In your tests you're simply doing Map.put(context, "forecast" "sunny"), but how would I go about getting access to the entities to see if location was provided and if so, go hit an endpoint to pull the weather.

Wit.ai shows this example code:

getForecast({context, entities}) {
  return new Promise(function(resolve, reject) {
    var location = firstEntityValue(entities, "location")
    if (location) {
      context.forecast = 'sunny in ' + location; // we should call a weather API here
      // ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.