Thanks @JiteshGaikwad ! This is helpful. Also, I notice there is some additional usage on the webchat Github page
here. How do i incorporate these additional usage (sending image file, video etc) into my custom action file?
For the buttons/ quick replies, i specify a certain pattern in domain.yml. But how do i use something as below?
You have to convert the json code they provide into yaml (unless there is another way of doing it I donât know about). So in your response in domain.yml
utter_some_message:
- text: hello world
attachment:
type: template
payload:
template_type: generic
elements:
- title: Title here
buttons:
- title: Link name here
url: "http://link.url"
Iâve been using a converter tool to see and check to make sure I have exactly what they require on their docs. Something like this worked for me, can even type in YAML and check to see the JSON matches too. https://www.json2yaml.com/
To further this discussion. I am wondering if anyone has any experience adding custom things like cards or carousels similar to how facebookâs looks? My impression is that youâd have to add a custom react component. Iâm just curious as to what extent. Does it require forking of their base code to make it work or can we just add some react components in the init section of the script?
I did have a quick browse through the code but I am only a little familiar with the react process.
Hi @JiteshGaikwad, It worked fine for me but if I put the script part in other template its not working how to make it work in any template ? thank you.
Iâm really sorry I wasnât feeling well so I didnât see your message. The script part taken from GitHub is working fine.
// Or you can replace latest with a specific version
But if I put the same code in different chat templates it is not working. I changed java script in the new chat html template but still itâs not working.
I have included script but it wasnât showing here so Iâm attaching link of the code: GitHub - botfront/rasa-webchat: A chat widget for Rasa and Botfront from here I have taken script and created a html page and put in it. Its working fine till here. what my question is if I place same webchat script in other html chatting templates It wasnât working what is the reason.
2020-03-18 09:41:41 DEBUG rasa.core.utils - Available web server routes:
/conversations/<conversation_id>/messages POST add_message
/conversations/<conversation_id>/tracker/events POST append_events
/webhooks/rasa GET custom_webhook_RasaChatInput.health /webhooks/rasa/webhook POST custom_webhook_RasaChatInput.receive /webhooks/rest GET custom_webhook_RestInput.health /webhooks/rest/webhook POST custom_webhook_RestInput.receive /model/test/intents POST evaluate_intents
/model/test/stories POST evaluate_stories
/conversations/<conversation_id>/execute POST execute_action
/domain GET get_domain
/socket.io GET handle_request
/ GET hello
/model PUT load_model
/model/parse POST parse
/conversations/<conversation_id>/predict POST predict
/conversations/<conversation_id>/tracker/events PUT replace_events
/conversations/<conversation_id>/story GET retrieve_story
/conversations/<conversation_id>/tracker GET retrieve_tracker
/webhooks/socketio GET socketio_webhook.health
/status GET status
/model/predict POST tracker_predict
/model/train POST train
/conversations/<conversation_id>/trigger_intent POST trigger_intent
/model DELETE unload_model
/version GET version
2020-03-18 09:41:41 INFO root - Starting Rasa server on http://localhost:5005
2020-03-18 09:41:41 DEBUG rasa.core.utils - Using the default number of Sanic workers (1).
2020-03-18 09:41:41 INFO root - Enabling coroutine debugging. Loop id 1621305365384.
2020-03-18 09:41:41 DEBUG rasa.model - Extracted model to âC:\Users\lluchini\AppData\Local\Temp\tmpar5dl75oâ.
2020-03-18 09:41:42 INFO rasa.nlu.components - Added âSpacyNLPâ to component cache. Key âSpacyNLP-ptâ.
2020-03-18 09:41:42 DEBUG rasa.utils.tensorflow.models - Loading the model âŚ
2020-03-18 09:41:42.770020: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ânvcuda.dllâ; dlerror: nvcuda.dll not found 2020-03-18 09:41:42.775639: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2020-03-18 09:41:42.781225: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: apdata676
2020-03-18 09:41:42.787204: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: apdata676
2020-03-18 09:41:42.790519: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-03-18 09:41:43 DEBUG rasa.utils.tensorflow.models - Finished loading the model.
2020-03-18 09:41:43 DEBUG rasa.utils.tensorflow.models - Building tensorflow prediction graphâŚ
2020-03-18 09:41:43.669010: W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Cancelled: Operation was cancelled
2020-03-18 09:41:47 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow prediction graph.
2020-03-18 09:41:47 DEBUG rasa.nlu.classifiers.diet_classifier - Failed to load model. Maybe the path âC:\Users\lluchini\AppData\Local\Temp\tmpar5dl75o\nluâ doesnât exist?
2020-03-18 09:41:47 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore.
2020-03-18 09:41:47 DEBUG rasa.core.lock_store - Connected to lock store âInMemoryLockStoreâ.
2020-03-18 09:41:47 DEBUG rasa.model - Extracted model to âC:\Users\lluchini\AppData\Local\Temp\tmp0up4ifrcâ.
2020-03-18 09:41:47 DEBUG pykwalify.compat - Using yaml library: c:\venv\lib\site-packages\ruamel\yaml_init_.py
2020-03-18 09:41:47 DEBUG rasa.utils.tensorflow.models - Loading the model âŚ
2020-03-18 09:41:48 DEBUG rasa.utils.tensorflow.models - Finished loading the model.
2020-03-18 09:41:48 DEBUG rasa.utils.tensorflow.models - Building tensorflow prediction graphâŚ
2020-03-18 09:41:48.085525: W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Cancelled: Operation was cancelled
2020-03-18 09:41:48 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow prediction graph.
2020-03-18 09:41:48 DEBUG rasa.core.nlg.generator - Instantiated NLG to âTemplatedNaturalLanguageGeneratorâ.
Hey @lluchini, I see you havenât registered your bot with socket.io channel due to which you are facing the above issue, check this out it may help you:
Hello @JiteshGaikwad, if youâre talking about the credentials.yml it was already set like below.
# This file contains the credentials for the voice & chat platforms
# which your bot is using.
# https://rasa.com/docs/rasa/user-guide/messaging-and-voice-channels/
rest:
# # you don't need to provide anything here - this channel doesn't
# # require any credentials
rasa:
url: "http://localhost:5002/api"
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true
And at the log from previously post the socket.io is listed as below.
I have tried your tutorial and it works. However, when I enter any message it reads the message but there is no reply that is sent from the botâŚany suggestions on how to fix it?
2020-03-22 15:47:31 DEBUG rasa.core.processor - Received user message âheyâ with intent â{ânameâ: âgreetâ, âconfidenceâ: 0.9997854828834534}â and entities â[]â
2020-03-22 15:47:31 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 7 events.
2020-03-22 15:47:31 DEBUG rasa.core.lock_store - Deleted lock for conversation âb267a27e10bf41a2bf222a0b3cca1806â.
the issue still perils. whether I use single quote or double quote. please see below
(rasa-venv) m.srinivasan@ATTACHCREDITTONE Rasa-Init-Yes-Train-InitialModel % rasa run -m ./models/20200323-132806.tar.gz --enable-api --cors â*â --debug