def get_state(self) -> entity_component.ComponentState:
    """Converts the component to JSON data."""
    with self._lock:
      if self._previous_time is None:
        previous_time = ''
      else:
        previous_time = self._previous_time.strftime('%Y-%m-%d %H:%M:%S')
      return {
          'previous_time': previous_time,
          'situation_thus_far': self._situation_thus_far,
      }
Converts the component to JSON data.
concordia/contrib/components/agent/situation_representation_via_narrative.py