class_docstr: Example one person world that talks to a provided agent (bot).
class_docstr_tok: ["Example","one","person","world","that","talks","to","a","provided","agent","(","bot",")","."]
code: def parley(self):
      if self.first_time:
          self.agent.observe(
              {
                  "id": "World",
                  "text": "Welcome to the ParlAI Chatbot demo. "
                  "You are now paired with a bot - feel free to send a message."
                  "Type [DONE] to finish the chat, or [RESET] to reset the dialogue history.",
              }
          )
          self.first_time = False
      a = self.agent.act()
      if a is not None:
          if "[DONE]" in a["text"]:
              self.episodeDone = True
          elif "[RESET]" in a["text"]:
              self.model.reset()
              self.agent.observe(
                  {"text": "[History Cleared]", "episode_done": False}
              )
          else:
              print("===act====")
              print(a)
              print("~~~~~~~~~~~")
              self.model.observe(a)
              response = self.model.act()
              print("===response====")
              print(response)
              print("~~~~~~~~~~~")
              self.agent.observe(response)
  
imports: from parlai.core.worlds import World
  from parlai.chat_service.services.messenger.worlds import OnboardWorld
  from parlai.core.agents import create_agent_from_shared
label_desc: Use image node_id 4 for calling the MessengerBotChatTaskWorld obj's underlying member method code with example usage: obj.parley() without return types