dialoguekit.platforms.platform¶
The Platform facilitates displaying of the conversation.
Classes¶
Represents a platform. |
Module Contents¶
- class dialoguekit.platforms.platform.Platform(agent_class: Type[dialoguekit.participant.Agent])¶
Bases:
abc.ABC
Represents a platform.
- Parameters:
agent_class – The class of the agent.
- abstract start() None ¶
Starts the platform.
- Raises:
NotImplementedError – If the method is not implemented.
- abstract display_agent_utterance(user_id: str, utterance: dialoguekit.core.Utterance) None ¶
Displays an agent utterance.
- Parameters:
user_id – User ID.
utterance – An instance of Utterance.
- Raises:
NotImplementedError – If the method is not implemented.
- abstract display_user_utterance(user_id: str, utterance: dialoguekit.core.Utterance) None ¶
Displays a user utterance.
- Parameters:
user_id – User ID.
utterance – An instance of Utterance.
- Raises:
NotImplementedError – If the method is not implemented.
- get_new_agent() dialoguekit.participant.Agent ¶
Returns a new instance of the agent.
- Returns:
Agent.
- get_user(user_id: str) dialoguekit.participant.User ¶
Returns the user.
- Parameters:
user_id – User ID.
- Returns:
User.
- connect(user_id: str) None ¶
Connects a user to an agent.
- Parameters:
user_id – User ID.
- disconnect(user_id: str) None ¶
Disconnects a user from an agent.
- Parameters:
user_id – User ID.
- message(user_id: str, text: str) None ¶
Gets called every time there is a new user input.
- Parameters:
user_id – User ID.
text – User input.
- feedback(user_id: str, utterance_id: str, value: int) None ¶
Gets called every time there is a new utterance feedback.
- Parameters:
user_id – User ID.
utterance_id – Utterance ID.
value – Feedback value.