class_docstr: Interactive world for wizard of wikipedia.
  
  Used for models trained on the task `-t wizard_of_wikipedia`. Automatically
  retrieves knowledge from Wikipedia based on the conversation history using a TF-IDF
  retriever. Then uses a Transformer-based model to select a checked sentence from
  these retrieved passages.
class_docstr_tok: ["Interactive","world","for","wizard","of","wikipedia",".","Used","for","models","trained","on","the","task","`","-t","wizard_of_wikipedia","`",".","Automatically","retrieves","knowledge","from","Wikipedia","based","on","the","conversation","history","using","a","TF-IDF","retriever",".","Then","uses","a","Transformer-based","model","to","select","a","checked","sentence","from","these","retrieved","passages","."]
code: def _add_knowledge_to_act(self, act):
      self.knowledge_agent.observe(act, actor_id="apprentice")
      knowledge_act = self.knowledge_agent.act()
      act["knowledge"] = knowledge_act["text"]
      act["checked_sentence"] = knowledge_act["checked_sentence"]
      if self.print_checked_sentence:
          print(
              "[ Using chosen sentence from Wikpedia ]: {}".format(
                  knowledge_act["checked_sentence"]
              )
          )
      act["title"] = knowledge_act["title"]
      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 6 for calling the InteractiveWorld obj's underlying member method code with example usage: obj._add_knowledge_to_act(act) and returns: act