dialoguekit.core.dialogue

Interface representing the sequence of utterances in a dialogue.

Classes

Dialogue

Represents a dialogue.

Module Contents

class dialoguekit.core.dialogue.Dialogue(agent_id: str, user_id: str, conversation_id: str = None)

Represents a dialogue.

Parameters:
  • agent_id – Agent ID.

  • user_id – User ID.

  • conversation_id – Conversation ID. Defaults to None.

property conversation_id: str

Returns the conversation ID.

property agent_id: str

Returns the agent ID.

property user_id: str

Returns the user ID.

property utterances: List[dialoguekit.core.utterance.Utterance]

Returns the utterances in the dialogue.

get_utterance_feedback(utterance_id: str) dialoguekit.core.feedback.UtteranceFeedback

Returns feedback on given utterance.

property metadata: Dict[str, Any]

Returns the metadata of the dialogue.

property current_turn_id: int

Returns the ID of the current utterance.

add_utterance(utterance: dialoguekit.core.utterance.Utterance) None

Adds an utterance to the history.

Parameters:

utterance – An instance of Utterance.

add_utterance_feedback(utterance_feedback: dialoguekit.core.feedback.UtteranceFeedback, utterance_id: str) None

Adds user’s feedback on utterance level.

The feedback previously added for a given utterance is overwritten.

Parameters:
  • utterance_feedback – User’s feedback.

  • utterance_id – Utterance ID.

to_dict() Dict[str, Any]

Converts the dialogue to a dictionary.

Returns:

Dialogue as dictionary.