class_docstr: A chat world in which an image is shown to the worker and bot at the beginning.
class_docstr_tok: ["A","chat","world","in","which","an","image","is","shown","to","the","worker","and","bot","at","the","beginning","."]
code: def __init__(
      self, opt, agent, bot, image_idx: int, image_act: Message
  ):
      super().__init__(opt, agent=agent, bot=bot)
  
      self.image_stack = opt["image_stack"]
      self.image_idx = image_idx
      self.image_act = image_act
  
      # Get a stringified version of the image to show the user
      orig_image = self.image_act["image"]
      self.image_src = get_image_src(image=orig_image)
  
      # Get a featurized version of the image to show the bot
      with NamedTemporaryFile(suffix=".jpg") as f:
          orig_image.save(f)
          image_loader = ImageLoader(self.bot.model_agent.opt)
          self.image_act.force_set("image", image_loader.load(f.name))
  
file_path: ParlAI/parlai/crowdsourcing/tasks/model_chat/worlds_image_chat.py
imports: from tempfile import NamedTemporaryFile
  from typing import Any, Dict, List, Tuple
  from parlai.core.image_featurizers import ImageLoader
  from parlai.core.message import Message
  from parlai.core.worlds import validate
  from parlai.crowdsourcing.tasks.model_chat.utils import Compatibility, get_image_src
  from parlai.crowdsourcing.tasks.model_chat.worlds import BaseModelChatWorld, get_bot_worker
label_desc: Use image node_id 1 to create a new ModelImageChatWorld object from inherited base classes: BaseModelChatWorld with example: obj = ModelImageChatWorld(opt, agent, bot, image_idx, image_act)