code: def add_text(
      state, text, image, video, image_process_mode, request: gr.Request
  ):
      logger.info(
          f"add_text. ip: {request.client.host}. len: {len(text)}"
      )
      if len(text) <= 0 and (image is None and video is None):
          state.skip_next = True
          return (state, state.to_gradio_chatbot(), "", None, None) + (
              no_change_btn,
          ) * 5
      if args.moderate:
          flagged = violates_moderation(text)
          if flagged:
              state.skip_next = True
              return (
                  state,
                  state.to_gradio_chatbot(),
                  moderation_msg,
                  None,
                  None,
              ) + (no_change_btn,) * 5
      if image is not None:
          text = (text, image, None, image_process_mode)
          if len(state.get_images(return_pil=True)) > 0:
              state = default_conversation.copy()
      if video is not None:
          text = (text, None, video, image_process_mode)
          if len(state.get_videos()) > 0:
              state = default_conversation.copy()
      state.append_message(state.roles[0], text)
      state.append_message(state.roles[1], None)
      state.skip_next = False
      return (state, state.to_gradio_chatbot(), "", None, None) + (
          disable_btn,
      ) * 5
  
imports: import argparse
  import datetime
  import json
  import os
  import time
  import gradio
  import requests
  import tempfile
  import shutil
  from llamavid.conversation import default_conversation, conv_templates, SeparatorStyle
  from llamavid.constants import LOGDIR
  from llava.utils import build_logger, server_error_msg, violates_moderation, moderation_msg
  import hashlib
label_desc: Use image node_id 11 for calling a global function with example usage: add_text(state, text, image, video, image_process_mode, request) and returns: unknown, unknown, unknown