class_docstr: A ready-to-use Response Generator  model
  
  The class can be used to generate and continue dialogue given the user input.
  The given YAML must contain the fields specified in the *_NEEDED[] lists.
  It needs to be used with custom.py to load the expanded GPT model with added tokens like bos,eos, and speaker's tokens.
  
  Example
  -------
  >>> from speechbrain.inference.text import GPTResponseGenerator
  
  >>> tmpdir = getfixture("tmpdir")
  >>> res_gen_model = GPTResponseGenerator.from_hparams(source="speechbrain/MultiWOZ-GPT-Response_Generation",
  ... savedir="tmpdir",
  ... pymodule_file="custom.py")  # doctest: +SKIP
  >>> response = res_gen_model.generate_response("I want to book a table for dinner")  # doctest: +SKIP
code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      # convert special tokens to their ids
      (
          self.bos,
          self.eos,
          self.system,
          self.user,
      ) = self.model.tokenizer.convert_tokens_to_ids(
          self.hparams.special_tokens
      )
  
imports: import torch
  from itertools import chain
  from speechbrain.inference.interfaces import Pretrained, EncodeDecodePipelineMixin
label_desc: Use image node_id 1 to create a new GPTResponseGenerator object from inherited base classes: ResponseGenerator with example: obj = GPTResponseGenerator()