def __init__(
      self,
      model: language_model.LanguageModel,
      clock: game_clock.MultiIntervalClock,
      memory_component_name: str = (
          memory_component.DEFAULT_MEMORY_COMPONENT_NAME
      ),
      components: Mapping[
          entity_component.ComponentName, str
      ] = types.MappingProxyType({}),
      num_salient_to_retrieve: int = 20,
      num_questions_to_consider: int = 3,
      num_to_retrieve_per_question: int = 10,
      pre_act_key: str = DEFAULT_PRE_ACT_KEY,
      logging_channel: logging.LoggingChannel = logging.NoOpLoggingChannel,
  ):
    """Generates affect reflection based on recent and salient memories.

    Args:
      model: a language model
      clock: the game clock is needed to know when is the current time
      memory_component_name: The name of the memory component from which to
        retrieve recent memories.
      components: The components to consider when reflecting. This is a mapping
        of the component name to a label to use in the prompt.
      num_salient_to_retrieve: retrieve this many salient memories.
      num_questions_to_consider: how many questions to ask self.
      num_to_retrieve_per_question: how many memories to retrieve per question.
      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._memory_component_name = memory_component_name
    self._components = dict(components)
    self._clock = clock
    self._num_salient_to_retrieve = num_salient_to_retrieve
    self._num_questions_to_consider = num_questions_to_consider
    self._num_to_retrieve_per_question = num_to_retrieve_per_question
    self._logging_channel = logging_channel
    self._previous_pre_act_value = ''
Generates affect reflection based on recent and salient memories.

    Args:
      model: a language model
      clock: the game clock is needed to know when is the current time
      memory_component_name: The name of the memory component from which to
        retrieve recent memories.
      components: The components to consider when reflecting. This is a mapping
        of the component name to a label to use in the prompt.
      num_salient_to_retrieve: retrieve this many salient memories.
      num_questions_to_consider: how many questions to ask self.
      num_to_retrieve_per_question: how many memories to retrieve per question.
      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/contrib/components/agent/deprecated/affect_reflection.py