code: def get_prompt(
      message: str,
      chat_history: list[tuple[str, str]],
      system_prompt: str,
  ) -> str:
      texts = [f"<s>[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n"]
      # The first user input is _not_ stripped
      do_strip = False
      for user_input, response in chat_history:
          user_input = user_input.strip() if do_strip else user_input
          do_strip = True
          texts.append(
              f"{user_input} [/INST] {response.strip()} </s><s>[INST] "
          )
      message = message.strip() if do_strip else message
      texts.append(f"{message} [/INST]")
      return "".join(texts)
  
file_path: BigDL/python/llm/example/GPU/HF-Transformers-AutoModels/Model/voiceassistant/generate.py
imports: import os
  import torch
  import time
  import argparse
  import numpy
  import inquirer
  import sounddevice
  from bigdl.llm.transformers import AutoModelForCausalLM
  from bigdl.llm.transformers import AutoModelForSpeechSeq2Seq
  from transformers import LlamaTokenizer
  from transformers import WhisperProcessor
  from transformers import TextStreamer
  from colorama import Fore
  import speech_recognition
  from datasets import load_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: get_prompt(message, chat_history, system_prompt) and returns: str