def __init__(
      self,
      model: language_model.LanguageModel,
      clock_now: Callable[[], datetime.datetime],
      observation_component_key: str,
      components: Mapping[
          entity_component.ComponentName, str
      ] = types.MappingProxyType({}),
      declare_entity_as_protagonist: bool = True,
      pre_act_label: str = 'The current situation',
      logging_channel: logging.LoggingChannel = logging.NoOpLoggingChannel,
  ):
    """Initialize a component to consider the current situation.

    Args:
      model: The language model to use.
      clock_now: Function that returns the current time.
      observation_component_key: The name of the component that contains the
        latest observations.
      components: Components to condition the narrative on. This is a mapping
        of the component name to a label to use in the prompt.
      declare_entity_as_protagonist: Whether to declare the entity to be the
        protagonist in the prompt.
      pre_act_label: Prefix to add to the output of the component when called
        in `pre_act`.
      logging_channel: The channel to log debug information to.
    """
    super().__init__(pre_act_label)
    self._model = model
    self._clock_now = clock_now
    self._observation_component_key = observation_component_key
    self._components = dict(components)
    self._declare_entity_as_protagonist = declare_entity_as_protagonist
    self._logging_channel = logging_channel

    self._previous_time = None
    self._situation_thus_far = None
Initialize a component to consider the current situation.

    Args:
      model: The language model to use.
      clock_now: Function that returns the current time.
      observation_component_key: The name of the component that contains the
        latest observations.
      components: Components to condition the narrative on. This is a mapping
        of the component name to a label to use in the prompt.
      declare_entity_as_protagonist: Whether to declare the entity to be the
        protagonist in the prompt.
      pre_act_label: Prefix to add to the output of the component when called
        in `pre_act`.
      logging_channel: The channel to log debug information to.
    
concordia/contrib/components/agent/situation_representation_via_narrative.py