controller.controller_flask_rest¶
This file contains the Controller class which controls the flow of the conversation while the user interacts with the agent using Flask REST.
Module Contents¶
Classes¶
Helper class that provides a standard way to create an ABC using |
- class controller.controller_flask_rest.ControllerFlaskRest(agent_class: Type[moviebot.agent.agent.MovieBotAgent], agent_args: Dict[str, Any] = {})¶
Bases:
moviebot.controller.controller.ControllerHelper class that provides a standard way to create an ABC using inheritance.
- start(host: str = '127.0.0.1', port: str = '5001') None¶
Starts the platform.
- Parameters:
host – Hostname. Defaults to 127.0.0.1.
port – Port. Defaults to 5001.
- receive_message() None¶
Receives POST requests send from client.
- display_agent_utterance(user_id: str, utterance: dialoguekit.core.Utterance) None¶
Stores the agent’s reply to the given user.
- Parameters:
user_id – User ID.
utterance – An instance of Utterance.
- display_user_utterance(user_id: str, utterance: dialoguekit.core.Utterance) None¶
Overrides the method in Platform to avoid raising an error.
This method is not used in ControllerFlaskRest.
- Parameters:
user_id – User ID.
utterance – An instance of Utterance.