class_docstr: Completes text prompts.
class_docstr_tok: ["Completes","text","prompts","."]
docstr: :param prompts:
      The text prompts.
  
  :returns:
      - The completed texts.
      - The output of the underlying sequence generator.
docstr_tok: [":","param","prompts",":","The","text","prompts",".",":","returns",":","-","The","completed","texts",".","-","The","output","of","the","underlying","sequence","generator","."]
code: def batch_complete(
      self, prompts: Sequence[StringLike]
  ) -> Tuple[List[StringLike], SequenceGeneratorOutput]:
      """
      :param prompts:
          The text prompts.
  
      :returns:
          - The completed texts.
          - The output of the underlying sequence generator.
      """
      if len(prompts) == 0:
          raise ValueError(
              "`prompts` must contain at least one element, but is empty instead."
          )
  
      prompt_seq_list = [self.text_encoder(p) for p in prompts]
  
      prompt_seqs, prompt_padding_mask = pad_seqs(prompt_seq_list)
  
      return self._do_complete(prompt_seqs, prompt_padding_mask)
  
imports: from abc import ABC
  from typing import List, Optional, Sequence, Tuple, final
  from torch import Tensor
  from fairseq2.data import StringLike
  from fairseq2.data.text import TextTokenDecoder, TextTokenEncoder, TextTokenizer
  from fairseq2.generation.generator import Seq2SeqGenerator, Seq2SeqGeneratorOutput, SequenceGenerator, SequenceGeneratorOutput
  from fairseq2.nn.padding import PaddingMask, pad_seqs
  from fairseq2.nn.utils.module import infer_device
label_desc: Use image node_id 3 for calling the TextCompleter obj's underlying member method code with example usage: obj.batch_complete(prompts) and returns: self