class_docstr: OPT BB3 Agent.
class_docstr_tok: ["OPT","BB3","Agent","."]
docstr: Return either vanilla batch act or opening batch act.
  
  :param observations:
      list of observations
  :param module:
      module to perform simple batch act with
  
  :return batch_act:
      return batch act from appropriate agent module.
docstr_tok: ["Return","either","vanilla","batch","act","or","opening","batch","act",".",":","param","observations",":","list","of","observations",":","param","module",":","module","to","perform","simple","batch","act","with",":","return","batch_act",":","return","batch","act","from","appropriate","agent","module","."]
code: def batch_act_simple(
      self,
      observations: List[Dict[Union[str, Module], Message]],
      module: Module,
  ) -> List[Message]:
      """
      Return either vanilla batch act or opening batch act.
  
      :param observations:
          list of observations
      :param module:
          module to perform simple batch act with
  
      :return batch_act:
          return batch act from appropriate agent module.
      """
      batch_agent = self.batch_agents[module]
      if module is Module.OPENING_DIALOGUE:
          batch_act = self.get_opening(observations)
      else:
          batch_act = batch_agent.batch_act(
              [o[module] for o in observations]
          )
  
      batch_reply_final = [
          Message({}) for _ in range(len(observations))
      ]
      failed = self.detect_and_handle_failures(
          module, batch_act, batch_reply_final
      )
  
      for i, reply in enumerate(batch_act):
          if i in failed:
              set_failed_reply(reply)
          else:
              reply[module.message_name()] = reply["text"]
              reply[f"{module.message_name()}_score"] = reply.get(
                  "logprobs", float("inf")
              )
      batch_reply_final = self.collate_batch_acts(
          batch_reply_mdm=[Message({})] * len(observations),
          batch_reply_sdm=[Message({})] * len(observations),
          batch_reply_mgm_partner=[Message({})] * len(observations),
          batch_reply_mgm_self=[Message({})] * len(observations),
          batch_reply_sgm=[Message({})] * len(observations),
          batch_reply_knowledge=[Message({})] * len(observations),
          batch_reply_dialogue=batch_act,
          available_memory=[o["raw"]["memories"] for o in observations],
      )
      return self.detect_and_handle_final_failures(batch_reply_final)
  
imports: import copy
  import random
  from typing import List, Optional, Dict, Any, Union, Tuple
  from parlai.agents.rag.retrievers import Document
  from parlai.core.agents import Agent, create_agent
  from parlai.core.message import Message
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import parlai.utils.logging
  from projects.bb3.agents.module import Module
  from projects.bb3.agents.r2c2_bb3_agent import BlenderBot3Agent
  from projects.bb3.agents.opt_api_agent import BB3OPTAgent
  from projects.bb3.agents.search_agent import SearchAgent
  from projects.bb3.agents.utils import Decision, APIUtils, is_opener, DisplayUtils, set_failed_reply
  import projects.bb3.prompts
label_desc: Use image node_id 22 for calling the BlenderBot3Agent obj's underlying member method code with example usage: obj.batch_act_simple(observations, module) and returns: self