Multiple variables in a dispatcher.utter_template()

On page: Domains I found:

dispatcher.utter_template("utter_default", tracker, my_variable="my text")

But what is the syntax for multiple variables?

They are keyword args, so you should be able to add as many as you like :slight_smile:

1 Like

will replacing the variables in utter_template work for a custom output payload ?

dispatcher.utter_template(“utter_result”, tracker, results=str(Results)) was populating none

[ { “recipient_id”: “abc”, “custom”: [ { “results”: null } ] } ]

Utter_result is defined as below. utter_result:

  • custom:
    • {results}

Hi @sivaMK

may I suggest a custom nlg_server for this purpose? Adding meta_data or custom payloads should not be handled while building an utterance, imho.

There is a sample on GitHub how this can be done.