class_docstr: Dataset for Causal Language modeling.
docstr: Get encodings for a single conversation history.
  Args:
      input_text_dict: A dictionary containing the input text for a single sample.
      Contains the keys "systems", "prompts", "answers".
      System may be an empty string.
docstr_tok: ["Get","encodings","for","a","single","conversation","history",".","Args",":","input_text_dict",":","A","dictionary","containing","the","input","text","for","a","single","sample",".","Contains","the","keys","``","systems","''",",","``","prompts","''",",","``","answers","''",".","System","may","be","an","empty","string","."]
code: def get_encodings(self, input_text_dict: Dict[str, List[str]]):
      """
      Get encodings for a single conversation history.
      Args:
          input_text_dict: A dictionary containing the input text for a single sample.
          Contains the keys "systems", "prompts", "answers".
          System may be an empty string.
      """
      encodings = [
          self._get_sample_encoding(system, prompt, answer)
          for idx, (system, prompt, answer) in enumerate(
              zip(
                  input_text_dict["systems"],
                  input_text_dict["prompts"],
                  input_text_dict["answers"],
              )
          )
      ]
  
      if self.mode == "train":
          encodings = self.augment_data(encodings)
  
      system_encoding = encodings[0][0]
      prompt_encodings = [encoding[1] for encoding in encodings]
      answer_encodings = [encoding[2] for encoding in encodings]
      # concatenate system encoding with root prompt encoding
      prompt_encodings[0] = torch.cat(
          [system_encoding, prompt_encodings[0]]
      )
      return (
          system_encoding,
          prompt_encodings,
          answer_encodings,
      )
  
imports: import codecs
  import collections.abc
  import logging
  from typing import Any, Dict, List, Tuple, Union
  import numpy
  import pandas
  import torch
  from torch.utils.data import Dataset
  from llm_studio.src.datasets.conversation_chain_handler import ConversationChainHandler
  from llm_studio.src.datasets.text_utils import get_tokenizer
label_desc: Use image node_id 16 for calling the CustomDataset obj's underlying member method code with example usage: obj.get_encodings(input_text_dict) and returns: system_encoding,  prompt_encodings,  answer_encodings