class_docstr: Displays a chatbot output showing both user submitted messages and responses. Supports a subset of Markdown including bold, italics, code, and images.
  Preprocessing: this component does *not* accept input.
  Postprocessing: expects function to return a {List[Tuple[str | None | Tuple, str | None | Tuple]]}, a list of tuples with user message and response messages. Messages should be strings, tuples, or Nones. If the message is a string, it can include Markdown. If it is a tuple, it should consist of (string filepath to image/video/audio, [optional string alt text]). Messages that are `None` are not displayed.
  
  Demos: chatbot_simple, chatbot_multimodal
docstr: Parameters:
      value: Default value to show in chatbot. If callable, the function will be called whenever the app loads to set the initial value of the component.
      label: component name in interface.
      every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
      show_label: if True, will display label.
      visible: If False, component will be hidden.
      elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
      elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
docstr_tok: ["Parameters",":","value",":","Default","value","to","show","in","chatbot",".","If","callable",",","the","function","will","be","called","whenever","the","app","loads","to","set","the","initial","value","of","the","component",".","label",":","component","name","in","interface",".","every",":","If","`","value","`","is","a","callable",",","run","the","function","'every","'","number","of","seconds","while","the","client","connection","is","open",".","Has","no","effect","otherwise",".","Queue","must","be","enabled",".","The","event","can","be","accessed","(","e.g",".","to","cancel","it",")","via","this","component","'s",".load_event","attribute",".","show_label",":","if","True",",","will","display","label",".","visible",":","If","False",",","component","will","be","hidden",".","elem_id",":","An","optional","string","that","is","assigned","as","the","id","of","this","component","in","the","HTML","DOM",".","Can","be","used","for","targeting","CSS","styles",".","elem_classes",":","An","optional","list","of","strings","that","are","assigned","as","the","classes","of","this","component","in","the","HTML","DOM",".","Can","be","used","for","targeting","CSS","styles","."]
code: def __init__(
      self,
      value: List[Tuple[str | None, str | None]]
      | Callable
      | None = None,
      color_map: Dict[str, str]
      | None = None,  # Parameter moved to Chatbot.style()
      *,
      label: str | None = None,
      every: float | None = None,
      show_label: bool = True,
      visible: bool = True,
      elem_id: str | None = None,
      elem_classes: List[str] | str | None = None,
      **kwargs,
  ):
      """
      Parameters:
          value: Default value to show in chatbot. If callable, the function will be called whenever the app loads to set the initial value of the component.
          label: component name in interface.
          every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
          show_label: if True, will display label.
          visible: If False, component will be hidden.
          elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
          elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
      """
      if color_map is not None:
          warnings.warn(
              "The 'color_map' parameter has been deprecated.",
          )
      # self.md = utils.get_markdown_parser()
      self.md = Markdown(
          extras=["fenced-code-blocks", "tables", "break-on-newline"]
      )
      self.select: EventListenerMethod
      """
          Event listener for when the user selects message from Chatbot.
          Uses event data gradio.SelectData to carry `value` referring to text of selected message, and `index` tuple to refer to [message, participant] index.
          See EventData documentation on how to use this event data.
          """
  
      IOComponent.__init__(
          self,
          label=label,
          every=every,
          show_label=show_label,
          visible=visible,
          elem_id=elem_id,
          elem_classes=elem_classes,
          value=value,
          **kwargs,
      )
  
file_path: NeMo/nemo/collections/nlp/modules/common/chatbot_component.py
imports: from __future__ import annotations
  import warnings
  from markdown2 import Markdown
label_desc: Use image node_id 1 to create a new Chatbot object from inherited base classes: Changeable, Selectable, IOComponent, JSONSerializable with example: obj = Chatbot(value, color_map)