class_docstr: Represents a best-of sequence generated during text generation.
  
  Args:
      generated_text (`str`):
          The generated text.
      finish_reason (`FinishReason`):
          The reason for the generation to finish, represented by a `FinishReason` value.
      generated_tokens (`int`):
          The number of generated tokens in the sequence.
      seed (`Optional[int]`):
          The sampling seed if sampling was activated.
      prefill (`List[InputToken]`):
          The decoder input tokens. Empty if `decoder_input_details` is False. Defaults to an empty list.
      tokens (`List[Token]`):
          The generated tokens. Defaults to an empty list.
class_docstr_tok: ["Represents","a","best-of","sequence","generated","during","text","generation",".","Args",":","generated_text","(","`","str","`",")",":","The","generated","text",".","finish_reason","(","`","FinishReason","`",")",":","The","reason","for","the","generation","to","finish",",","represented","by","a","`","FinishReason","`","value",".","generated_tokens","(","`","int","`",")",":","The","number","of","generated","tokens","in","the","sequence",".","seed","(","`","Optional","[","int","]","`",")",":","The","sampling","seed","if","sampling","was","activated",".","prefill","(","`","List","[","InputToken","]","`",")",":","The","decoder","input","tokens",".","Empty","if","`","decoder_input_details","`","is","False",".","Defaults","to","an","empty","list",".","tokens","(","`","List","[","Token","]","`",")",":","The","generated","tokens",".","Defaults","to","an","empty","list","."]
code: def __post_init__(self):
      if not is_pydantic_available():
          # If pydantic is not installed, we need to instantiate the nested dataclasses manually
          self.prefill = [
              InputToken(**input_token)
              if isinstance(input_token, dict)
              else input_token
              for input_token in self.prefill
          ]
          self.tokens = [
              Token(**token) if isinstance(token, dict) else token
              for token in self.tokens
          ]
  
imports: import warnings
  from dataclasses import field
  from enum import Enum
  from typing import List, NoReturn, Optional
  from requests import HTTPError
  from ..utils import is_pydantic_available
label_desc: Use image node_id 1 for calling the BestOfSequence obj's underlying member method code with example usage: obj.__post_init__() without return types