class_docstr: OPT BB3 Agent.
class_docstr_tok: ["OPT","BB3","Agent","."]
docstr: Command line args for OPT BB3.
docstr_tok: ["Command","line","args","for","OPT","BB3","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      """
      Command line args for OPT BB3.
      """
      cls.add_additional_subagent_args(parser)
      parser = R2C2Agent.add_cmdline_args(parser, partial_opt)
      group = parser.add_argument_group("OPT Agent Group")
      group.add_argument(
          "--opt-server",
          type=str,
          help="which server to connect to for hosted OPT model",
          default=None,
      )
      group.add_argument(
          "--raw-search-server",
          type=str,
          help="specify a search server address.",
          default=None,
      )
      group.add_argument(
          "--num-shots",
          type=int,
          default=None,
          help="how many k-shot examples to put in the prompt. Default <0 is all",
      )
      group.add_argument(
          "--include-prompt",
          type="bool",
          default=None,
          help="Whether to include prompt",
      )
      group.add_argument(
          "--all-vanilla-prompt",
          type="bool",
          default=None,
          help='If True, and --include-prompt, then all prompts are just the vanilla, "a conversation", prompts.',
      )
      group.add_argument(
          "--knowledge-chunk-size",
          type=int,
          default=100,
          help="Chunk size, in words, of knowledge to keep",
      )
      group.add_argument(
          "--debug-bb3", type="bool", default=False, dest="debug_bb3"
      )
      group.add_argument(
          "--max-prompt-len",
          type=int,
          default=PROMPT.MAX_PROMPT_LEN,
          help="Longest sequence to send to API",
      )
      group.add_argument(
          "--self-prefix",
          type=str,
          default=PROMPT.SELF_PREFIX,
          help="Token for prefixing self responses",
      )
      group.add_argument(
          "--self-memory-prefix",
          type=str,
          default=PROMPT.SELF_MEMORY_PREFIX,
          help="Token for prefixing self memories",
      )
      group.add_argument(
          "--partner-prefix",
          type=str,
          default=PROMPT.PARTNER_PREFIX,
          help="Token for prefixing self responses",
      )
      group.add_argument(
          "--partner-memory-prefix",
          type=str,
          default=PROMPT.PARTNER_MEMORY_PREFIX,
          help="Token for prefixing self memories",
      )
      parser.add_argument(
          "--metaseq-max-retry-api",
          default=-1,
          type=int,
          help="Number of times to retry on API request failures (< 0 for unlimited retry).",
      )
      parser.add_argument(
          "--metaseq-server-timeout", default=20.0, type=float
      )
      return parser
  
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 3 for calling the BlenderBot3Agent obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser