class_docstr: GPT2 with Retriever agent.
  
  This agent packs in the retrieved documents and input context as one big "prompt" to
  the language model.
class_docstr_tok: ["GPT2","with","Retriever","agent",".","This","agent","packs","in","the","retrieved","documents","and","input","context","as","one","big","``","prompt","''","to","the","language","model","."]
docstr: During generation, we send the label truncation to the model.
code: def _encoder_input(
      self, batch: Batch
  ) -> Tuple[
      torch.LongTensor,
      torch.LongTensor,
      torch.LongTensor,
      torch.LongTensor,
      Optional[torch.LongTensor],
  ]:
      """
      During generation, we send the label truncation to the model.
      """
      return (
          batch.text_vec,
          batch.text_vec.ne(self.NULL_IDX).sum(1),
          batch.query_vec,
          batch.input_turn_cnt_vec,
          batch.text_vec.new(batch.batchsize).fill_(
              self.label_truncate
          ),
      )
  
imports: from typing import Optional, Tuple, List, Union
  import torch
  import torch.nn
  from parlai.agents.fid.fid import FidModel, FidAgent, SearchQuerySearchEngineFiDAgent, WizIntGoldDocRetrieverFiDAgent
  from parlai.agents.hugging_face.gpt2 import Gpt2Agent
  from parlai.agents.rag.rag import BaseGenerationAgentMixin
  from parlai.agents.rag.retrievers import Document
  from parlai.core.dict import DictionaryAgent
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_agent import Batch, Output
  from parlai.core.torch_generator_agent import TorchGeneratorAgent
  from parlai.utils.torch import padded_tensor
  from projects.seeker.agents.seeker import SeekerAgent
  from projects.seeker.agents.gpt2_seeker_modules import GPT2WithRetrieverModel, ComboGPT2Model
label_desc: Use image node_id 9 for calling the GPT2WithRetrieverAgent obj's underlying member method code with example usage: obj._encoder_input(batch) and returns: batch,  batch,  batch,  batch,  batch