Skip to content

Commit

Permalink
Implement get_last_log in EntityAgent.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 650018520
Change-Id: Ia9e9ed9b1890e980a1991478c12a66b856077fc9
  • Loading branch information
duenez authored and copybara-github committed Jul 7, 2024
1 parent b63eb0c commit dcca67f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions concordia/agents/entity_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
agent_name: str,
act_component: component_v2.ActingComponent,
context_processor: component_v2.ContextProcessorComponent | None = None,
components: Mapping[str, component_v2.BaseComponent] = _EMPTY_MAPPING,
components: Mapping[str, component_v2.EntityComponent] = _EMPTY_MAPPING,
):
"""Initializes the agent.
Expand Down Expand Up @@ -150,4 +150,8 @@ def observe(
self._parallel_call_('update')

def get_last_log(self):
return '`get_last_log` is deprecated.'
log = {}
for name, component in self._components.items():
log[name] = component.get_last_log()

return log

0 comments on commit dcca67f

Please sign in to comment.