The last FastAPIComponent processes the request message and produces the response. I want to set that response in rasa so that rasa can send that response to the user.
This is the sample response of FastAPIComponent. It can generate both text and button responses.
{ ‘intent’: {‘name’: ‘greet’, ‘confidence’: 0.9999999403953552}, ‘entities’: None, ‘response’: [{‘recipientId’: None, ‘text’: “Hey! How are you today?”, ‘buttons’: None}]}
@stephens we have to handle multiple rasa models at once and we do that by using rasa agent in our fastapi application. The fastAPI component interacts with our fastapi application and send us back the final response. So even intent detection takes place there. The above config that you see does
Preprocess the text
Sends the text to the fastapi server and gets response in return
Now we need to set this response in our rasa , if it was text only we could easily set that, it’s the buttons that we are trying to find out way for.
ok, but the NLU pipeline is not the place to handle responses.
I don’t fully understand your architecture (wonder why you don’t follow a standard approach with each model hosted by a Rasa instance) but I don’t think your approach fits in well with the Rasa architecture.
NLU and Dialog have always been separate in Rasa. Since you’re doing both in the same component, I’m not sure that Rasa fits well.