wit.ai

How do I execute custom methods in Wit.ai from a PHP API?

会有一股神秘感。 提交于 2020-02-05 03:53:07
问题 I have a bot on Wit.ai which I would like to make calls to a PHP API. Is there any way to go about this? I've seen how to do it for JavaScript and Python but I can't seem to find a way to do this for PHP. 回答1: Apparently, the way to perform custom operations or make method calls is based on the response entities. You can make request to wit.ai, which send a response with certain entities based on the intelligence learned from the request. When you get the response use it to perform custom

The context key is not initialised if it’s not in reply - wit.ai

╄→гoц情女王★ 提交于 2020-01-17 05:21:06
问题 I have created a new app in wit.ai. In stories, after the 'User says', I have added a function getReply() using 'Bot executes' and added two context keys with branch in it. If both the keys are available, I'm sending a reply to the user using the 'Bot says' and it will go to the next step else it will ask the missing key to the user. The issue is, in the reply I'm using only one of the context key. The flow works if that key is available. It doesn't considers about the other key. It is

How to eliminate negative utterances while using LUIS/WIT Intent

删除回忆录丶 提交于 2019-12-24 06:34:05
问题 I have an intent "BookTicket" . I have few utterances for the same: "book a ticket", "book my ticket" .....it works fine. It also works with "do not book a ticket", "book my show" . My question is: How can I eliminate these negative searches to search for the intent mentioned above and return an error message instead of invoking the intent. Right now, I am trying this with LUIS framework. thanks 回答1: In case of LUIS, use the None intent to mark the negative examples you want to eliminate,

How do I use wit.ai with existing rows of data?

只愿长相守 提交于 2019-12-23 03:32:08
问题 I have a lot of existing data that I would like to use as training data for a wit.ai chatbot. The data is stored in a csv file where each row has a statement/question and a response to that statement/question. I know that wit.ai requires you to assign intents to comments made and so I'm wondering if there is a way to simply send over the data I have and have the chatbot start learning intents on its own. Thanks! 回答1: "Teaching" Wit.Ai is not exactly what some might think it is. You will have

wit.ai - unrecognised user entries

孤人 提交于 2019-12-22 14:48:55
问题 is it possible to have a catch-all for unrecognized user entries to move the user into a particular story? For example in a conversation. If there are no matching stories the bot will respond to try and push the user back on track? [user] Hi how are you [bot] good, how are you? [user] great [bot] that is good --- user enters an un-matched sentence --- [bot] I did not understand you. Would you like to order a pizza? [user] yes ...etc 回答1: I don't know if it's the best solution but I do the

wit.ai - unrecognised user entries

纵饮孤独 提交于 2019-12-22 14:46:19
问题 is it possible to have a catch-all for unrecognized user entries to move the user into a particular story? For example in a conversation. If there are no matching stories the bot will respond to try and push the user back on track? [user] Hi how are you [bot] good, how are you? [user] great [bot] that is good --- user enters an un-matched sentence --- [bot] I did not understand you. Would you like to order a pizza? [user] yes ...etc 回答1: I don't know if it's the best solution but I do the

wit.ai - unrecognised user entries

别来无恙 提交于 2019-12-22 14:46:00
问题 is it possible to have a catch-all for unrecognized user entries to move the user into a particular story? For example in a conversation. If there are no matching stories the bot will respond to try and push the user back on track? [user] Hi how are you [bot] good, how are you? [user] great [bot] that is good --- user enters an un-matched sentence --- [bot] I did not understand you. Would you like to order a pizza? [user] yes ...etc 回答1: I don't know if it's the best solution but I do the

Make chatbot (wit.ai) reply that it doesn't have a proper answer

人盡茶涼 提交于 2019-12-22 08:19:33
问题 I am using Wit.ai for my chatbot. The problem is that my bot always tries to answer something. I will only make my bot answer if it actually understood what was being asked. I know it is possible, but if I have a bot with very few replies, it seems it always chooses one of the replies even though it is asked something completely different. I imagine it is possible to make it reply something like "I am sorry. I don't know what you are asking. I can help you with .....". Maybe I should use the

wit.ai - How to send request in Java?

拜拜、爱过 提交于 2019-12-21 18:41:29
问题 I'm working on a virtual assistent using wit.ai in Java, but I'm stuck making the HTTP request. I'm no pro at HTTP requests in Java and I get a error 400 the whole time. This is my code: public class CommandHandler { public static String getCommand(String command) throws Exception { String url = "https://api.wit.ai/message"; String key = "TOKEN HERE"; String param1 = "20141022"; String param2 = command; String charset = "UTF-8"; String query = String.format("v=%s&q=%s", URLEncoder.encode

how to build json array dynamically in javascript

风格不统一 提交于 2019-12-20 06:28:32
问题 I receive a json object with some number of quick reply elements from wit.ai, like this: "msg": "So glad to have you back. What do you want me to do? "action_id": "6fd7f2bd-db67-46d2-8742-ec160d9261c1", "confidence": 0.08098269709064443, "quickreplies": [ "News?", "Subscribe?", "Contribute?", "Organize?" ], "type": "msg" I then need to convert them to a slightly different format as they are passed to FaceBook Messenger as described in the code below. Wit only exposes 'msg' and 'quickreplies.'