Giter Site home page Giter Site logo

Comments (8)

ar7hur avatar ar7hur commented on August 24, 2024

By design the JSON output for an intent does not change when you change the name of the intent. We want the name to be human-friendly and flexible (good naming scheme emerge with usage, it's hard to find good names when you just start).

That being said, we could add a feature that enables you to change the JSON output name of the intent if you need it.

from wit.

Seraf avatar Seraf commented on August 24, 2024

Yes please, it would be great as it's what we receive in the API. So to match it correctly in our app (sometime we will have constraints about it) we need a little control on it.

from wit.

Seraf avatar Seraf commented on August 24, 2024

@alxbrun : we should be able to rename entities too !

from wit.

blandinw avatar blandinw commented on August 24, 2024

Renaming is available, see #11.
The feature enabling you to customize the JSON response is on its way too :)

from wit.

jejacks0n avatar jejacks0n commented on August 24, 2024

I just wanted to add to this. @ar7hur is correct, and that's good to do the current behavior by default, but the ability to change the intent name as presented in the JSON would be great too.

from wit.

jejacks0n avatar jejacks0n commented on August 24, 2024

I had another thought on this this weekend. I sort of use the intent "ids" that come back from the api as a path, used by a router to some degree.. I initially tried the concept of namespaces for intents, but yeah, the concept that I ended up with was more of a router (but I couldn't do this fully).

I started with something like "heroku:app:config", which allows you to configure a heroku app, but I landed on something more like "heroku/app/config", which if the "/"'s made it through the api, I would've been able to use to route a given intent to a controller and then the controller could delegate to an action. The code structure is not setup this way because it wasn't possible, but it seems like it might be useful to edit the intent "id"'s because during development I found myself restructuring that routing.

Anyway, yeah, I'd like some special chars to come through (eg. more of a path, instead of an identifier), and I think this should be something that can be changed. Maybe not in the most obvious of ways, but yes. =) What if the intent was restricted to valid uri characters, instead of stripping everything?

from wit.

ar7hur avatar ar7hur commented on August 24, 2024

Got you. The plan is for each intent to have 3 IDs:

  • one human readable "description" that you see in the web console, intents dropdown, etc.
  • one JSON name that you get in the API output: you'll be totally free to use any string for that, including URIs
  • one internal ID that you never see

from wit.

ar7hur avatar ar7hur commented on August 24, 2024

Please see https://wit.ai/blog/2013/12/25/update-on-intents-and-entities-naming
Now JSON output names always match the name you see in the console.

from wit.

Related Issues (20)

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.