I am referring to the following article from Rasa for generating a template-based response from my custom action server. The details are in the section titled “Calling Responses from Custom Actions”.
Link to the article - https://rasa.com/docs/rasa/responses/
Following is my domain.yml file
version: '3.0'
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
intents:
- greet
- create_OPEX
responses:
utter_greet:
- text: |
Hello! How can I help you?
- text: |
Hi!
actions:
- action_create_OPEX_Sheet
And my stories.yml looks something like this:
stories:
- story: greet and create_OPEX
steps:
- intent: greet
- action: utter_greet
- intent: create_OPEX
- action: action_create_OPEX_Sheet
The “action_create_OPEX_Sheet” action sends a REST call to my custom action server (Java Spring Boot), which returns the response in the following format:
{
"responses": [
{
"template": "utter_greet"
}
],
"events": []
}
This format is the same as provided in the article above, my problem is that despite my server sending a template response back, Rasa doesn’t send or generate any response based on that. It returns an empty response to the chatbot.
However, when I modify my custom action server to return a text-based response, it does work fine. In that case, it’ll return whatever text I send from my custom action server. But, I want template-based responses to work.
The text-based response being sent from the custom action server:
{
"responses": [
{
"text": "sample response from custom action server"
}
],
"events": []
}
Can you please let me know what am I doing wrong in this? Any help would be appreciated, thanks.
Version Details:
Rasa Version: 3.5.5 Minimum Compatible Version: 3.5.0 Rasa SDK Version: 3.5.1 Python Version: 3.10.11 Operating System: Windows-10-10.0.22621-SP0 Python Path: C:\Users\amann\AppData\Local\Programs\Python\Python310\python.exe