class_docstr: Interactive world for generative models.
  
  Specifically a world for models trained on the task `-t wizard_of_wikipedia
  generator`.
class_docstr_tok: ["Interactive","world","for","generative","models",".","Specifically","a","world","for","models","trained","on","the","task","`","-t","wizard_of_wikipedia","generator","`","."]
code: def _add_knowledge_to_act(self, act):
      act = super()._add_knowledge_to_act(act)
      if self.opt.get("prepend_gold_knowledge", False):
          warn_once(
              "Prepending selected knowledge to dialogue input."
              "If this was not intended behavior, please run with the "
              "flag --prepend-gold-knowledge False"
          )
          knowledge_text = " ".join(
              [
                  TOKEN_KNOWLEDGE,
                  act["checked_sentence"],
                  TOKEN_END_KNOWLEDGE,
              ]
          )
          new_text = "\n".join([knowledge_text, act["text"]])
          act.force_set("text", new_text)
      else:
          warn_once(
              "Not prepending selected knowledge to dialogue input."
              "If this was not intended behavior, please run with the "
              "flag --prepend-gold-knowledge True"
          )
      return act
  
imports: from typing import Optional
  from parlai.core.opt import Opt
  from copy import deepcopy
  import json
  import random
  import os
  import string
  from parlai.core.params import ParlaiParser
  from parlai.core.agents import create_agent
  from parlai.core.message import Message
  from parlai.core.worlds import DialogPartnerWorld, validate
  from parlai.tasks.wizard_of_wikipedia.agents import TOKEN_KNOWLEDGE, TOKEN_END_KNOWLEDGE
  from parlai.tasks.self_chat.worlds import SelfChatWorld
  from parlai.utils.misc import warn_once
  from .build import build
  from projects.wizard_of_wikipedia.knowledge_retriever.knowledge_retriever import KnowledgeRetrieverAgent
label_desc: Use image node_id 2 for calling the InteractiveGeneratorWorld obj's underlying member method code with example usage: obj._add_knowledge_to_act(act) and returns: act