Creating an Endpoint in Java (or other arbitrary language)

I’m trying to implement an endpoint in java for some custom actions. The HTTP API is quite confusing. I don’t want to influence the conversation tracker. I just want to replace the endpoint that I defined in my endpoints.yml. The only thing that this server should do is creating utterance messages based of parameters and may be set some slots if needed. What are the responses I need to implement? Is there an example of something similar out there?

@kengelmann did you also see this API spec: Action Server ?

I agree with @Tobias_Wochinger rather keep the action server and implement a custom action.

Look at GitHub - RasaHQ/starter-pack-rasa-stack: 🎒Everything you need to build your first contextual chatbot with the open source Rasa Stack - includes files and training data and more specifically starter-pack-rasa-stack/actions.py at master · RasaHQ/starter-pack-rasa-stack · GitHub .

In the above example the bot requests a Chuck Norris joke from an external server using a REST API … that should be a good starting point.

I’m not sure what I did wrong. My response body now looks this was:

{
    "responses": [{"text": ["random text Paul"]}],
    "events": [
        {
            "confidence": null,
            "name": "action_listen",
            "event": "action",
            "timestamp": 1.559570366489839E9,
            "policy": null
        },
        {
            "input_channel": "rest",
            "parse_data": {
                "entities": [{
                    "confidence": 0.6148514985168891,
                    "start": 9,
                    "extractor": "ner_crf",
                    "end": 13,
                    "value": "Paul",
                    "entity": "person"
                }],
                "intent_ranking": [
                    {
                        "confidence": 0.9509471654891968,
                        "name": "infosPerson"
                    },
                    {
                        "confidence": 0.11018642038106918,
                        "name": "bestaetigung"
                    },
                    {
                        "confidence": 0,
                        "name": "verabschiedung"
                    },
                    {
                        "confidence": 0,
                        "name": "verneinung"
                    },
                    {
                        "confidence": 0,
                        "name": "infosFach"
                    },
                    {
                        "confidence": 0,
                        "name": "begruessung"
                    }
                ],
                "text": "Wo sitzt Paul?",
                "intent": {
                    "confidence": 0.9509471654891968,
                    "name": "infosPerson"
                }
            },
            "text": "Wo sitzt Paul?",
            "event": "user",
            "timestamp": 1.559570366536517E9
        },
        {
            "name": "person",
            "event": "slot",
            "value": "Paul",
            "timestamp": 1.559570366536517E9
        }
    ]
}

but rasa core only response: “Encountered an exception while running action ‘action_personInfos’… Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.”

But there are no exceptions in my custom code…