class_docstr: A class that manages prompt templates and keeps all conversation history.
docstr: Get the prompt for generation.
docstr_tok: ["Get","the","prompt","for","generation","."]
code: def get_prompt(self) -> str:
      """Get the prompt for generation."""
      system_prompt = self.system_template.format(
          system_message=self.system_message
      )
      if self.sep_style == SeparatorStyle.ADD_COLON_SINGLE:
          ret = system_prompt + self.sep
          for role, message in self.messages:
              if message:
                  ret += role + ": " + message + self.sep
              else:
                  ret += role + ":"
          return ret
      elif self.sep_style == SeparatorStyle.ADD_COLON_TWO:
          seps = [self.sep, self.sep2]
          ret = system_prompt + seps[0]
          for i, (role, message) in enumerate(self.messages):
              if message:
                  ret += role + ": " + message + seps[i % 2]
              else:
                  ret += role + ":"
          return ret
      elif self.sep_style == SeparatorStyle.ADD_COLON_SPACE_SINGLE:
          ret = system_prompt + self.sep
          for role, message in self.messages:
              if message:
                  ret += role + ": " + message + self.sep
              else:
                  ret += role + ": "  # must be end with a space
          return ret
      elif self.sep_style == SeparatorStyle.ADD_NEW_LINE_SINGLE:
          ret = "" if system_prompt == "" else system_prompt + self.sep
          for role, message in self.messages:
              if message:
                  ret += role + "\n" + message + self.sep
              else:
                  ret += role + "\n"
          return ret
      elif self.sep_style == SeparatorStyle.NO_COLON_SINGLE:
          ret = system_prompt
          for role, message in self.messages:
              if message:
                  ret += role + message + self.sep
              else:
                  ret += role
          return ret
      elif self.sep_style == SeparatorStyle.NO_COLON_TWO:
          seps = [self.sep, self.sep2]
          ret = system_prompt
          for i, (role, message) in enumerate(self.messages):
              if message:
                  ret += role + message + seps[i % 2]
              else:
                  ret += role
          return ret
  
imports: import dataclasses
  from enum import auto, IntEnum
  from typing import List, Any, Dict
  import math
  from typing import List, Optional, Tuple, Union
  import random
  import numpy
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from transformers.activations import ACT2FN
  from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast, SequenceClassifierOutputWithPast
  from transformers.modeling_utils import PreTrainedModel
  from transformers.utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from transformers import LogitsProcessorList, MinLengthLogitsProcessor, TopKLogitsWarper, TemperatureLogitsWarper, TopPLogitsWarper, StoppingCriteriaList, MaxLengthCriteria, BitsAndBytesConfig
label_desc: Use image node_id 1 for calling the Conversation obj's underlying member method code with example usage: obj.get_prompt() and returns: ret, ret, ret, ret, ret, ret