class_docstr: Version of BaseModelChatWorld for chatting without images.
  
  Has support for features that are currently not supported by the image-chat version
  of this task, like personas and BST-style seed utterances.
class_docstr_tok: ["Version","of","BaseModelChatWorld","for","chatting","without","images",".","Has","support","for","features","that","are","currently","not","supported","by","the","image-chat","version","of","this","task",",","like","personas","and","BST-style","seed","utterances","."]
docstr: Run the initial turn for both the human and the bot.
  
  Optionally show the bot its persona. If we are in BST conversation mode, show 2
  previous BST utterances to both the human and the bot; if we are in Meena-like
  conversation mode, show "Hi!" to the human and the bot and let the bot respond
  accordingly.
docstr_tok: ["Run","the","initial","turn","for","both","the","human","and","the","bot",".","Optionally","show","the","bot","its","persona",".","If","we","are","in","BST","conversation","mode",",","show","2","previous","BST","utterances","to","both","the","human","and","the","bot",";","if","we","are","in","Meena-like","conversation","mode",",","show","``","Hi","!","''","to","the","human","and","the","bot","and","let","the","bot","respond","accordingly","."]
code: def _run_initial_turn(self) -> None:
      """
      Run the initial turn for both the human and the bot.
  
      Optionally show the bot its persona. If we are in BST conversation mode, show 2
      previous BST utterances to both the human and the bot; if we are in Meena-like
      conversation mode, show "Hi!" to the human and the bot and let the bot respond
      accordingly.
      """
  
      control_msg = {"episode_done": False}
  
      if self.opt["include_persona"]:
          # The Bot agent
          # We add the personas and 1/3 of the time WoW topic as the
          # first utterance in the history.
          # Previously for BST task, we also had a big first utterance
          # that gave instructions. Removing that for this task.
          persona_strings = [s.strip() for s in self.personas[1]]
          persona_utterance = self._get_persona_utterance(
              persona_strings=persona_strings,
              context_dataset=self.context_info["context_dataset"],
              additional_context=self.context_info[
                  "additional_context"
              ],
              is_bot=True,
          )
          message = control_msg.copy()
          message["text"] = persona_utterance
          # The bot seeing its persona does not count as a "turn"
          self.bot.observe(validate(message), increment_turn=False)
  
      if self.opt["conversation_start_mode"] == "blended_skill_talk":
          print("[Displaying first utterances as per BST task.]")
          # Display the previous two utterances
          human_first_msg = {
              "episode_done": False,
              "id": self.agent.agent_id,
              "text": self.context_info["person1_seed_utterance"],
              "fake_start": True,
              "agent_idx": 0,
          }
          for k, v in control_msg.items():
              human_first_msg[k] = v
          bot_first_msg = {
              "episode_done": False,
              "id": self.bot.agent_id,
              "text": self.context_info["person2_seed_utterance"],
              "fake_start": True,
              "agent_idx": 1,
          }
          print(
              f"human_first_msg: {human_first_msg}, bot_first_msg: {bot_first_msg}"
          )
  
          self.dialog.append(human_first_msg)
          self.dialog.append(bot_first_msg)
  
          for observer in [self.agent, self.bot]:
              observer.observe(validate(human_first_msg))
              observer.observe(validate(bot_first_msg))
  
      elif self.opt["conversation_start_mode"] == "hi":
          print('[Displaying "Hi!" only as per Meena task.]')
          if self.personas is not None:
              human_persona_strings = [
                  s.strip() for s in self.personas[0]
              ]
          else:
              human_persona_strings = ["", ""]
          human_first_msg = {
              "episode_done": False,
              "id": self.agent.agent_id,
              "text": "Hi!",
              "fake_start": True,
              "agent_idx": 0,
              "task_data": {
                  "human_persona_string_1": human_persona_strings[0],
                  "human_persona_string_2": human_persona_strings[1],
              },
          }
          for k, v in control_msg.items():
              human_first_msg[k] = v
  
          self.dialog.append(human_first_msg)
          self.agent.observe(validate(human_first_msg))
          self.bot.observe(validate(human_first_msg))
  
          first_bot_act = self.bot.act()
          first_bot_act = Compatibility.backward_compatible_force_set(
              first_bot_act, "id", self.bot.agent_id
          )
  
          self.agent.observe(validate(first_bot_act))
  
          bot_utterance_data = {
              "agent_idx": 1,
              "text": first_bot_act["text"],
              "id": first_bot_act["id"],
          }
          self.dialog.append(bot_utterance_data)
  
      else:
          raise ValueError(
              f"Conversation start mode {self.opt['conversation_start_mode']} "
              f"not recognized!"
          )
  
imports: import time
  import os
  import json
  from abc import ABC, abstractmethod
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  from parlai.core.agents import create_agent_from_shared
  from parlai.core.message import Message
  from parlai.core.worlds import validate
  from parlai.crowdsourcing.utils.acceptability import AcceptabilityChecker
  from parlai.crowdsourcing.utils.worlds import CrowdOnboardWorld, CrowdTaskWorld
  from parlai.crowdsourcing.tasks.model_chat.bot_agent import TurkLikeAgent
  from parlai.crowdsourcing.tasks.model_chat.constants import ONBOARD_FAIL, ONBOARD_SUCCESS
  from parlai.crowdsourcing.tasks.model_chat.utils import Compatibility
  from parlai.crowdsourcing.utils.mturk import get_mturk_id_from_mephisto_wrapper
  from typing import TYPE_CHECKING
label_desc: Use image node_id 2 for calling the ModelChatWorld obj's underlying member method code with example usage: obj._run_initial_turn() without return types