def __init__(
      self,
      model: language_model.LanguageModel,
      prompt: str,
      start_time: str,
      components: Sequence[str] = (),
      format_description_key: str = 'Clock format description',
      pre_act_label: str = '\nClock',
  ):
    """Initializes the component.

    This component is used to represent a clock that is updated by the language
    model based on the specified components and the latest event. The clock is
    updated on each step of the simulation, and is used to represent the
    current time or date.

    Args:
      model: The language model to use.
      prompt: description of what the clock represents, how it gets updated,
        and what it is used for.
      start_time: The initial time of the clock.
      components: Keys of components to condition clock updates on.
      format_description_key: The key to prepend to the descripton of the
        desired format to use in the prompt for the sample that produces the
        clock's update on each step.
      pre_act_label: Prefix to add to the output of the component when called
        in `pre_act`.
    """
    self._pre_act_label = pre_act_label
    self._model = model
    self._format_description_key = format_description_key
    self._prompt = prompt
    self._components = components

    chain_of_thought = interactive_document.InteractiveDocument(self._model)
    chain_of_thought.statement(self._prompt)
    chain_of_thought.statement(f'Start time: {start_time}')
    self._clock_description = chain_of_thought.open_question(
        question=(
            'Given the context above, when is the clock updated? How are times '
            'represented internally? (usually as a number of steps). And, how '
            'do internal time repesentations map to the time representations '
            'communicated to players?'
        ),
        max_tokens=1000,
        terminators=(),
    )

    self._num_steps = 0
    self._time = start_time
    self._prompt_to_log = ''
    self._latest_action_spec = None
Initializes the component.

    This component is used to represent a clock that is updated by the language
    model based on the specified components and the latest event. The clock is
    updated on each step of the simulation, and is used to represent the
    current time or date.

    Args:
      model: The language model to use.
      prompt: description of what the clock represents, how it gets updated,
        and what it is used for.
      start_time: The initial time of the clock.
      components: Keys of components to condition clock updates on.
      format_description_key: The key to prepend to the descripton of the
        desired format to use in the prompt for the sample that produces the
        clock's update on each step.
      pre_act_label: Prefix to add to the output of the component when called
        in `pre_act`.
    
concordia/components/game_master/world_state.py