def restore_direct_quote(
    chain_of_thought: interactive_document.InteractiveDocument,
    event: str,
    active_player_name: str,
):
  """Restore details from action attempt lost in subsequent processing.

  Args:
    chain_of_thought: the document to condition on and record the thoughts
    event: the candidate event
    active_player_name: name of player whose turn it currently is

  Returns:
    string describing the outcome
  """
  chain_of_thought.statement(
      '\n\nCandidate event statement which may have lost direct '
      f'quotes: {event}')
  event_with_quote = chain_of_thought.open_question(
      question=(
          'Incorporate the exact text of anything said or written '
          + f'by {active_player_name} into the candidate event statement. '
          + 'Note that all direct quotes should have been tagged in the '
          + f'text above with [direct quote]. If {active_player_name} '
          + 'said or wrote anything then their direct quote must be part of '
          + 'the answer. It is also important to maintain as much detail as '
          + 'possible from the latest candidate event statement.'
      ),
      max_tokens=3500,
      # Prevent runaway generations from completion models.
      terminators=(
          '\nCandidate event statement',
          '\nQuestion',
          '\nAnswer',
          '\n\n',
      ),
  )
  return event_with_quote
Restore details from action attempt lost in subsequent processing.

  Args:
    chain_of_thought: the document to condition on and record the thoughts
    event: the candidate event
    active_player_name: name of player whose turn it currently is

  Returns:
    string describing the outcome
  
concordia/thought_chains/deprecated/thought_chains.py