def __init__(
      self,
      *,
      model: language_model.LanguageModel,
      clock_now: Callable[[], datetime.datetime],
      timeframe_delta_from: datetime.timedelta,
      timeframe_delta_until: datetime.timedelta,
      memory_component_name: str = (
          memory_component.DEFAULT_MEMORY_COMPONENT_NAME
      ),
      components: Mapping[str, str] = types.MappingProxyType({}),
      prompt: str | None = None,
      display_timeframe: bool = True,
      pre_act_key: str = DEFAULT_OBSERVATION_SUMMARY_PRE_ACT_KEY,
      logging_channel: logging.LoggingChannel = logging.NoOpLoggingChannel,
  ):
    """Initializes the component.

    Args:
      model: Language model to summarise the observations.
      clock_now: Function that returns the current time.
      timeframe_delta_from: delta from the current moment to the begnning of the
        segment to summarise, e.g. 4h would summarise all observations that
        happened from 4h ago until clock_now minus timeframe_delta_until.
      timeframe_delta_until: delta from the current moment to the end of the
        segment to summarise.
      memory_component_name: Name of the memory component from which to retrieve
        observations to summarize.
      components: The components to condition the summary on. This is a mapping
        of component name to its label in the context for the
        summarization prompt.
      prompt: Language prompt for summarising memories and components.
      display_timeframe: Whether to display the time interval as text.
      pre_act_key: Prefix to add to the output of the component when called
        in `pre_act`.
      logging_channel: The channel to use for debug logging.
    """
    super().__init__(pre_act_key)
    self._model = model
    self._clock_now = clock_now
    self._timeframe_delta_from = timeframe_delta_from
    self._timeframe_delta_until = timeframe_delta_until
    self._memory_component_name = memory_component_name
    self._components = dict(components)

    self._prompt = prompt or (
        'Summarize the observations above into one or two sentences.'
    )
    self._display_timeframe = display_timeframe

    self._logging_channel = logging_channel
Initializes the component.

    Args:
      model: Language model to summarise the observations.
      clock_now: Function that returns the current time.
      timeframe_delta_from: delta from the current moment to the begnning of the
        segment to summarise, e.g. 4h would summarise all observations that
        happened from 4h ago until clock_now minus timeframe_delta_until.
      timeframe_delta_until: delta from the current moment to the end of the
        segment to summarise.
      memory_component_name: Name of the memory component from which to retrieve
        observations to summarize.
      components: The components to condition the summary on. This is a mapping
        of component name to its label in the context for the
        summarization prompt.
      prompt: Language prompt for summarising memories and components.
      display_timeframe: Whether to display the time interval as text.
      pre_act_key: Prefix to add to the output of the component when called
        in `pre_act`.
      logging_channel: The channel to use for debug logging.
    
concordia/components/agent/deprecated/observation.py