chatbot

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

ReactJS / Chatbot with hooks

北战南征 提交于 2020-02-05 03:53:07
问题 I have a static chatbot where I can display the messages through this: <ChatMessage bot={true}>Hi.</ChatMessage> like this img: const ChatBot = () => { return ( <Styled.ChatBox> <ChatMessage bot={true}>Hi.</ChatMessage> <ChatMessage bot={false}>Hello.</ChatMessage> </Styled.ChatBox> ); }; and this is my chatbot: function ChatMessage(props) { return ( <Styled.ChatMessage bot={props.bot}>{props.children}</Styled.ChatMessage> ); } ChatMessage.defaultProps = { bot: false, }; const Chat = props =>

typing indicator in chatbot

扶醉桌前 提交于 2020-01-25 08:32:28
问题 Typing indicator for bot framework in nodejs Hi, i am working with microsoft bot framework v4, node js, i need to implement typing in chat bot. the bot should respond like(...) as response before sending the original response. i have seen the code here Send a typing indicator in bot-framework v4 using DirectLine and webchat (Node.js) code is working fine in local but when i deploy it to azure, typing(...) is not coming, i can see a delay for 3 secs in response in azure . my code await step

AIML Chatbot response differs at different times?

删除回忆录丶 提交于 2020-01-25 08:01:11
问题 A separate question for the AIML bot in my previous post... How do you create a bot that responds at different times of the day? I feel like it will make him seem more "real." I can't make heads or tails about how the date and time display actually works. I assume you'd have to fiddle with that alongside the set/get functions... but that's all I know for sure. I would like my bot to do something like this. TIME: Noon USER: Hi, bot. BOT: Good afternoon, USER! It's about lunchtime for me. Where

Node js execute function before complete multiple lines of code

十年热恋 提交于 2020-01-25 07:19:29
问题 This function: function print(){ console.log('num 1') setTimeout(() => { global.name = 'max' console.log('num 2') },9000); console.log('num 3'); } print(); console.log(global.name) is priting this: num 1 num 3 undefined num 2 And I need to: print num 1 wait untill the 9 seconds set the global.name = max print num 2 print num 3 console.log(global.name) print max and not undefined I wrote this code in python and it executese line by line because there is nothing called sync and async. I need

Can Dialogflow response time limit be modified?

≯℡__Kan透↙ 提交于 2020-01-24 20:08:49
问题 I am making a bot on dialogflow with a webhook. I get an error : DEADLINE_EXCEEDED. My webhook takes a bit over 5 seconds to return a response. Is there a way to allow a longer time than 5 seconds ? 回答1: this is not possible. One possibility is to (if you have for example a background task which takes some time) is to send back (before the 5 sec timeout) an Event. This triggers again a call to the Webhook, so you get another 5 sec to finish your background process. Beppe 来源: https:/

QnA bot not displaying table format properly

99封情书 提交于 2020-01-24 16:25:06
问题 My QnA maker Knowledge Base is currently trained by a pdf file (http://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf ). While testing, QnA bot is not displaying the table formats from the input given. The below image shows how it is currently displayed in the QnA maker test page. What should I do to bring the table format (with all the row and column borders) to the chat result as same as in the input pdf file. 回答1: According to the

Facebook chatbot responds with “Action Unsuccessful” error to Persistent Menu postback

二次信任 提交于 2020-01-24 06:36:48
问题 My facebook Chatbot's persistent menu was working fine until a few days ago, once in every few tries when I click on a persistent menu item it would raise a popup error : Action Unsuccessful There was an error delivering your message to the bot. Please try again later. This happens sporadically, and I checked that when this happens my PHP code's side didn't receive any postback from facebook. When there's no error the postback works fine. Is anyone else getting this error? My Persistent menu

How to implement an interactive decision tree in C#

寵の児 提交于 2020-01-23 02:05:07
问题 I need to allow the users choose their own path by picking between two simple choices displayed on their screen in order to progress to the next set of choices, until they get to one of the endings, i.e something like this should be achieved: I have tried the following code, but only the left side is evaluated each time. I am wondering how can I achieve a results like the above image (covering all the branches)? For instance, if the user selects "No" the application shouldn't ask any further

Chat BoT Exception: OnTurnAsync exception— Operation returned an invalid status code 'BadRequest'

倖福魔咒の 提交于 2020-01-16 16:29:10
问题 I am getting this error only after I deployed my bot to azure web app and tried to Test in azure portal Web Chat. But my bot is working as expected from bot emulator on my local machine. I am not sure if this is due to the azure role assigned to me.My assigned role is showing as "Limited Contributor". I am able to create any resource and deploy my chat bot to azure.So not sure if this has anything to do with my "Limited Contributor" role. Here is the line of code(marked in red) where it is