添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
从容的生姜  ·  python ...·  7 月前    · 
刚毅的针织衫  ·  pyqt5 qtextedit ...·  8 月前    · 
纯真的长颈鹿  ·  SSL For ...·  1 年前    · 

I have recently upgraded my RASA:

Using pip install -r requirements_dev.txt I installed the following packages and their dependencies:

rasa==1.6.1
spacy==2.1.8
rasa-sdk==1.6.0
numpy==1.16.0
python-socketio==4.3.1
python-engineio==3.9.3
livereload
pytest==5.2.2
cx_Oracle==7.2.2
python-dateutil==2.8.0
multidict==4.6.1

To start the chatbot I did this:

Terminal 1:

rasa train 

Terminal 2:

rasa run --endpoints endpoints.yml --credentials credentials.yml --cors "*"

Terminal 3:

rasa run actions --actions actions

Terminal 4:

livereload

After loading the bot in the browser I start to chat with it. Afterwards I get the following warnings in terminal 2:

UserWarning: Interpreter parsed an intent 'name:' that is not defined in the domain.
UserWarning: Interpreter parsed an intent 'name_last:' that is not defined in the domain.
UserWarning: Interpreter parsed an intent 'street_name:' that is not defined in the domain.
UserWarning: Interpreter parsed an intent 'house_number:' that is not defined in the domain.

This is strange, since these intents are clearly defined in my domain-file:

domain.yml:

intents:
- name
- name_last
- street_name
- house_number

I tried using different formats but this was not helpful.

When I did rasa train it says that it found 37 distinct intens. One of them is the intent name, the other intens listed above are not mentioned.

It was never a problem. Maybe the new version has some requirements I do not know about?

Hope you can help me!

@ varunsapre10 Yes and no. I just realized, that the intents only specified in domain.yml file were not found during training. However, I did so all the time and it was fine in previous versions.

Therefore, I have just included the intents in nlu.md file as well. However, I am not realy sure if these are actually intents. I use them effectively as slots that have to be filled.

  • Bot asks for the name. User types name. Bot saves name in slot name.
  • Bot asks for the last name. User types his last name. Bot saves last name in slot name_last.
  • In domain.yml file:

    intents:
    - name
    - name_last
    - street_name
    - house_number
    entities:
    - name
    - name_last
    - street_name
    - house_number
    slots:
      name:
        type: unfeaturized
      name_last:
        type: unfeaturized
      street_name:
        type: unfeaturized
      house_number:
        type: unfeaturized
    actions:
    forms:
    templates:
      utter_ask_name:
        - text: What is your first name?
          buttons:
            - title: "FirstName"
              payload: "name"
      utter_ask_name:
        - text: What is your last name?
          buttons:
            - title: "LastName"
              payload: "name_last"
    

    Anything wrong with that? I try to set the intent value hard. This is why I am not sure if this realy is an intent. Also intent, entity and slot share all the same name. Not sure if this is good. Not even sure if I have to specify intent, entity and slot for what I want.

    There isn’t anything different to the way you are using it right now. You would just define your stories in a similar way, but replace the name/street_name and house number intents with inform.

    # Get name of the client
    - utter_request_name
    * inform  # Instead of the "name" intent
    - .... save the name
    # Get streetname of the client
    - utter_request_street_name
    * inform  # Instead of the "street_name" intent
    - .... save the street name
    

    The inform intent just represents a user providing some details.

    - Ich heiße [Peter](name) - Man nennnt mich [Peter](name) - Sie können mich Peter [Peter](name) nennen

    Running rasa data validate gives me:

    image1892×159 18.9 KB

    Above, you can read an old warning, which I think has nothing to do with this, because it used to appear some time before this problem came up, and is not so crucial according to what I found out.

    There is a very related problem in this post, in which the person asks the same question.There I have added most information to my problem.

    So picking back up on this, @Chatbot_Ra do you have any updated data or a repo for this so I can see what you are having? From my experience we should only see these messages when we truly are missing configurations somewhere. I want to help you get this resolved but I need to see your complete data if I can to help on this more.

    Is that doable?

    Hey, the problem is solved. It was my mistake. Not Rasa’s mistake.

    It was the index.html file in which I set the slots hard:

    This is how it used to be:

    res.value = `/${slot}:{"${slot}": "${res.value}"}`;   //  here I set the slot in the frontend
    socket.emit('user_uttered', {message: res.value});
    

    This is how it should be:

    res.value = `/${slot}{"${slot}": "${res.value}"}`;   //  here I set the slot in the frontend
    socket.emit('user_uttered', {message: res.value});
    

    Thanks for all your help! I really appreciate it!