i would like to send the last User utterance to a Webhook, but there doesn´t seem to be a placeholder for this.
“$last-user-utterance” only works inside a Generator, but nowhere else.
Bard suggested “$session.params.user_message”, which does not work.
How can i access that last User message? I would like to send it to a RAG pipeline for answering of “open question answering”
thanks for the reply! I´m not sure i understand your answer and how to work with a DF request payload this inside of Dialogflow? I´d simply like to add the User utterance to the Webhook request body: eg.: {“question”: “$last-user-utterance”}
So basically im using a webhook and i need to send it a json object which is of the last user utterance. What do i add in the json object?. Last user utterance doesnt seem to work. Or how do i setup the page to that auto request is sent to the webhook
if you use a “standard webhook”, the utterance is part of the request.
if you use a “custom webhook”, there is no way of accessing the utterance.
Still not sure what the product people had in their minds to do it this way, as it does not make any sense to me. Principally exposing the utterance for “standard webhooks” feels like an unnecessary data-leak, not having it for “custom” is diminishing the capabilities of Dialogflow UX.
To capture the last user message for a webhook or RAG pipeline, store it as a session parameter in Dialogflow ($request.queryResult.text), use tracker.latest_message.get('text') in RASA, or capture it in custom bots via req.body.user_message (Node.js/Python). Use event.payload.text in Botpress.