Open theresazobel opened 1 year ago
Buttons with text input enabled:
Recommender Form:
title: - from actions_recommender_responses.yml
language_option_german: Deutsch language_option_english: Englisch language_option_any: Beide Sprachen
topic_option_introduction_ai: Einführung in die KI topic_option_specialized_ai: Vertiefung einzelner Themenfelder der KI topic_option_professions_and_ai: KI in Berufsfeldern topic_option_society_and_ai: KI und Gesellschaft topic_option_data_science: Data Science topic_option_machine_learning: Maschinelles Lernen topic_option_any: egal
level_option_beginner: Anfänger:in level_option_advanced: Fortgeschrittene:r level_option_expert: Expert:in
duration_option_max_10h: bis zu 10 Stunden duration_option_max_50h: maximal 50 Stunden duration_option_any: auch über 50 Stunden
certificate_option_unqualified: Teilnahmebescheinigung certificate_option_qualified: Leistungsnachweis (benotet) certificate_option_any: egal
das versteh ich jetzt nicht ganz. Das sind doch alles Buttons - warum braucht man da noch den text input?
Das sind die Label/ Titel der Buttons. Text input bezogen auf deine vorherige Formulierung, also dort soll eine freie Texteingabe möglich sein, damit der User beispielsweise die Befragung abbrechen kann oder FAQs/ Zwischenfragen stellen kann, etc.
Ich überlege gerade, ob das denn so sinnvoll ist. Das haben wir beispielsweise in anderen Forms nicht. Würde nicht ein Button "Zurück" oder ähnlich mehr Sinn machen um die Konversation zu unterbrechen?
Edit: vielleicht auch einen "Etwas anderes"-Button?
I would prefer a solution that would allow to enable/disable the input-field based on additional (i.e. custom
) data that is sent by Rasa:
E.g. generally disable input when (active) buttons are displayed, but when buttons are sent to the frontend with custom
data like {"on_buttons": {"disable_input": false}}
, the text input stays enabled.
E.g. in yaml
something like
responses:
utter_greet:
- text: "Hey! How are you?"
buttons:
- title: "great"
payload: "/mood_great"
- title: "super sad"
payload: "/mood_sad"
- custom:
on_buttons:
disable_input: false
(disclaimer: I haven't tested the yaml
solution, but I am 95% sure that it should work that way)
or in a custom action implementation something like
buttons = [{"title": "great", "payload": "/mood_great"}, {"title": "sad", "payload": "/mood_sad"}]
custom = [{"on_buttons": {"disable_input": False}}]
dispatcher.utter_message(text="Hey! How are you?", buttons=buttons, custom=custom)
which (in both cases) would result in JSON message (from the Rasa REST API) like
[
{"recipient_id": "...",
"text": "Hey! How are you?",
"buttons": [
{"title": "great", "payload": "/mood_great"},
{"title": "sad", "payload": "/mood_sad"}
]},
{"recipient_id": "...",
"custom": [
{"on_buttons": {"disable_input": false}}
]}
]
... which the frontend would then interpret, that is, it should process it so that it "disables the input-field-disabling", i.e. leave the input-field enabled in this case (when custom
data {"on_buttons": {"disable_input": false}}
is sent), even though active buttons are displayed.
The custom signals make sense. However, as suggested in the meeting I would add an "Ich habe ein andere Anliegen" button to the recommender form with a custom signal ( disable_input: true). When clicked, the user input is enabled again and the user can type out a message. We can additionally send a message from the frontend after clicking saying "Alles klar, wie kann ich dir helfen" so the user sees that something changed.
Should we do it like that?
We can additionally send a message from the frontend after clicking saying "Alles klar, wie kann ich dir helfen" so the user sees that something changed.
I would prefer, not sending anything back to rasa
when the user clicks this button:
we would need to adjust all stories & retrain for this special case (otherwise rasa
would predict wrong user-/system-turns on receiving such a message as user interaction).
(messages such as "Alles klar, wie kann ich dir helfen" could be automatically be inserted by the web interface without sending anything to rasa
)
So I would prefer either no message at all to rasa
, or --if there really must be such a message sent to rasa
-- only for logging i.e. not as a user interaction (although I don't know if there is such an endpoint at the rasa
API or message format that would allow only logging without triggering an interaction).
@russaa okay ich think we are telking about the same thing :) I will show a message just from the frontend when this button is clicked + enabling the input field and will nit send anything back to rasa.
Hello,
I am now planning to disable the text input when buttons are available.
@TabeaOt @russaa Please comment on special cases, when you do not want the text input to be disabled on the button showing.