All - Activity - Krogsager - Rasa Community Forum

Formatting bot response with newline etc

I looked for it in github but couldn’t find one, so I must have forgotten to do it ¯\ (ツ)

When you download Duckling from github, there is no program, only source code. You are going to compile the source code with Haskell. You will need to run these two commands form your terminal, as it says in the Readme on Github.

$ stack build
$ stack exec duckling-example-exe

“Illegal instruction (core dumped)” indicates that some C code crashed. You could try to debug that using PDB, but in my experience you are heading a long road that might lead to nowhere.

TensorFlow library was compiled to use AVX instructions, but these aren’t available on your machine.

There are a lot of dependencies that are easier to install and use on Linux. I think you will have a lot of issues when developing in Windows. Should you feel adventurous, then you can try Cygwin or Ubuntu on Windows

You need to install wget first, since it is not native to Windows. I would recommend that you use Linux instead. Here is an introduction.

This tool is absolutely necessary, and it should be running whenever training happens. TBH it should not even be possible to write new stories in Rasa X without validation from this tool. When multiple members of a team are working together, it is very easy for one to accidentally create conflicting …

Edit: I realised that the responses are saved in a .yaml file, so that's it. TL:DR, for new lines use \n in custom actions and the yaml markdown formatting in rasa x. But it might not work for everything.

Is the same possible in custom actions? E.g.:

actions.py
def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
    # [...] some logic
    message = f"hello {username}! \\n\\n" #\\n does not produce a new line
    message = message + f" today...

Is it possible to apply formatting to bot responses that comes from custom actions? I can’t figure out how to do things like linebreak, bold, italic, bullets, when the response comes from python code. I’m also looking for documentation on the formatting syntax for Rasa X.

I don’t understand why training fails after I’ve added Duckling to my pipeline. Training fra Rasa X, traceback from docker console.

config.yml
language: dk
pipeline:
  - name: supervised_embeddings
  - name: DucklingHTTPExtractor
    url: 'http://localhost:8000'
    dimensions:
      - time

If you are experienced with Docker then use Docker Hub for Duckling. If not, then pull Duckling from Github and install Haskell, and compile it yourself.

I’ve had similar issues a long time ago so I don’t remember if it was due to an incompatible CPU or just Windows being Windows. The latter is not a problem since you are on Ubuntu. I’m just thinking out loud:

Did you upgrade pip (>19.0)? Does your CPU support AVX?

Here is an example action I made to get Likert ratings. But notice that the custom actions syntax may have changed because this was done on an older version of Rasa.

class ActionStoreLikertPsychological(Action):
    def …

Yes, the intent carries an entity. Give the entity and slot the same name, then it will be filled.

# story1
* ask_weather{"location": "Caracas"}
- action_weather_api

I’m trying to save changes to my model configuration but rasa x gives me an error.

language: en
pipeline: supervised_embeddings
policies:
  - name: MemoizationPolicy
  - name: KerasPolicy
  - name: MappingPolicy
  - name: FallbackPolicy
nlu_threshold: 0.4
core_threshold: 0.3
fallback_action: ...

I would guess you have too few examples, and they are too similar. “pv first” is in every single intent. Try making at least 10 unique phrases for each intent and write different entities.

Including a bare bones example, we collect and process your personal information for the following purposes: Visitor Statistics, Browsing Behavior.