Skip to content

Commit

Permalink
Make observe_latest a private function of the agent.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 636545976
Change-Id: Ie519ccbac70819fc40d4e6f855c297f0fc68364c
  • Loading branch information
duenez authored and copybara-github committed May 23, 2024
1 parent 9d13d51 commit 32a3023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions concordia/agents/basic_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def get_externality(externality):

return output

def observe_latest(self, conversation: str):
def _observe_latest(self, conversation: str):
# If the prefix is not found then `find` returns -1.
prefix_start_index = conversation.find(self._conversation_prefix)
if prefix_start_index >= 0:
Expand All @@ -303,7 +303,7 @@ def observe_latest(self, conversation: str):
self._conversation_prefix = conversation

def say(self, conversation: str) -> str:
self.observe_latest(conversation)
self._observe_latest(conversation)
convo_context = (
f'{self._agent_name} is in the following'
f' conversation:\n{conversation}\n'
Expand Down

0 comments on commit 32a3023

Please sign in to comment.