code: def get_prompt(mm_use_im_start_end, first_round, conv, user_input):
      if first_round:
          # first message
          if mm_use_im_start_end:
              user_input = (
                  DEFAULT_IM_START_TOKEN
                  + DEFAULT_IMAGE_TOKEN
                  + DEFAULT_IM_END_TOKEN
                  + "\n"
                  + user_input
              )
          else:
              user_input = DEFAULT_IMAGE_TOKEN + "\n" + user_input
          conv.append_message(conv.roles[0], user_input)
      else:
          # later messages
          conv.append_message(conv.roles[0], user_input)
      conv.append_message(conv.roles[1], None)
      return conv.get_prompt()
  
file_path: BigDL/python/llm/example/CPU/PyTorch-Models/Model/llava/generate.py
imports: import argparse
  import torch
  import time
  from transformers import AutoModelForCausalLM
  from llava.model.language_model.llava_llama import LlavaLlamaForCausalLM
  from transformers import AutoTokenizer
  from llava.constants import DEFAULT_IMAGE_PATCH_TOKEN, IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN
  from llava.conversation import conv_templates, SeparatorStyle
  from llava.utils import disable_torch_init
  from llava.mm_utils import process_images, tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria
  from bigdl.llm import optimize_model
label_desc: Use image node_id 5 for calling a global function with example usage: get_prompt(mm_use_im_start_end, first_round, conv, user_input) and returns: conv