My requirement is to change the internal CollectingDispatcher code. Inside it, I want to change the utter_template method to the following code:
def utter_template(self,
template, # type: Text
tracker, # type: Tracker
silent_fail=False, # type: bool
from_phone=None,
**kwargs # type: Any
):
# type: (...) -> None
""""Send a message to the client based on a template."""
if from_phone == 'desktop':
message = {"template": template + '_d'}
else:
message = {"template": template}
message.update(kwargs)
self.messages.append(message)
The above code will call the template with name ending with _d if the from_phone attribute is desktop.
I have changed the code.Changed the file as follows and ran it.
then the version that is used when you run your program is not the one where you changed the source code. You need to install from git, see installation docs for details: Installation
Okay.Can I use the packages I installed from git in production.Do they create any issues as they are still in development and how to install the specific version of 0.14.3 or 0.14.5.
Also how is the code that I installed from pip is not running and some other one is running? Just want to know out of curiosity.
I have followed the instructions as per documentation and done the following.
pip install requirements.txt
pip install -e . ( Can you tell me what this will do.googled it but couldn’t find it.)
After that created a new project, with stories, custom action.
Now I want to change the collectingDispatcher code. In the downloaded files, I couldn’t find the executor.py where collectingDispatcher will be there. In fact Rasa_sdk is not their in the files.
I am clueless what to do…can anyone help me out please.