Skip to content

Commit

Permalink
Update argument order display_user_utterance
Browse files Browse the repository at this point in the history
  • Loading branch information
NoB0 committed Nov 7, 2024
1 parent f90d7a3 commit 14012e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dialoguekit/connector/dialogue_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def register_user_utterance(
"""
self._dialogue_history.add_utterance(annotated_utterance)
self._platform.display_user_utterance(
self._user.id, annotated_utterance
annotated_utterance, self._user.id
)
self._agent.receive_utterance(annotated_utterance)

Expand Down
4 changes: 2 additions & 2 deletions dialoguekit/platforms/flask_socket_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ def display_agent_utterance(
)

def display_user_utterance(
self, user_id: str, utterance: Utterance
self, utterance: Utterance, user_id: str
) -> None:
"""Overrides the method in Platform to avoid raising an error.
This method is not used in FlaskSocketPlatform.
Args:
user_id: User ID.
utterance: An instance of Utterance.
user_id: User ID.
"""
pass

Expand Down
4 changes: 2 additions & 2 deletions dialoguekit/platforms/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ def display_agent_utterance(

@abstractmethod
def display_user_utterance(
self, user_id: str, utterance: Utterance
self, utterance: Utterance, user_id: str
) -> None:
"""Displays a user utterance.
Args:
user_id: User ID.
utterance: An instance of Utterance.
user_id: User ID.
Raises:
NotImplementedError: If the method is not implemented.
Expand Down
4 changes: 2 additions & 2 deletions dialoguekit/platforms/terminal_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ def display_agent_utterance(
print(f"AGENT: {utterance.text}")

def display_user_utterance(
self, user_id: str, utterance: Utterance
self, utterance: Utterance, user_id: str
) -> None:
"""Displays a user utterance.
Args:
user_id: User ID.
utterance: An instance of Utterance.
user_id: User ID.
"""
pass

0 comments on commit 14012e6

Please sign in to comment.