class_docstr: Reference: https://github.com/petals-infra/chat.petals.dev#post-apiv1generate
  The `PetalsConfig` class encapsulates the configuration for the Petals API. The properties of this class are described below:
  
  - `max_length` (integer): This represents the maximum length of the generated text (including the prefix) in tokens.
  
  - `max_new_tokens` (integer): This represents the maximum number of newly generated tokens (excluding the prefix).
  
  The generation parameters are compatible with `.generate()` from Hugging Face's Transformers library:
  
  - `do_sample` (boolean, optional): If set to 0 (default), the API runs greedy generation. If set to 1, the API performs sampling using the parameters below:
  
  - `temperature` (float, optional): This value sets the temperature for sampling.
  
  - `top_k` (integer, optional): This value sets the limit for top-k sampling.
  
  - `top_p` (float, optional): This value sets the limit for top-p (nucleus) sampling.
  
  - `repetition_penalty` (float, optional): This helps apply the repetition penalty during text generation, as discussed in this paper.
class_docstr_tok: ["Reference",":","https",":","\/\/github.com\/petals-infra\/chat.petals.dev","#","post-apiv1generate","The","`","PetalsConfig","`","class","encapsulates","the","configuration","for","the","Petals","API",".","The","properties","of","this","class","are","described","below",":","-","`","max_length","`","(","integer",")",":","This","represents","the","maximum","length","of","the","generated","text","(","including","the","prefix",")","in","tokens",".","-","`","max_new_tokens","`","(","integer",")",":","This","represents","the","maximum","number","of","newly","generated","tokens","(","excluding","the","prefix",")",".","The","generation","parameters","are","compatible","with","`",".generate","(",")","`","from","Hugging","Face","'s","Transformers","library",":","-","`","do_sample","`","(","boolean",",","optional",")",":","If","set","to","0","(","default",")",",","the","API","runs","greedy","generation",".","If","set","to","1",",","the","API","performs","sampling","using","the","parameters","below",":","-","`","temperature","`","(","float",",","optional",")",":","This","value","sets","the","temperature","for","sampling",".","-","`","top_k","`","(","integer",",","optional",")",":","This","value","sets","the","limit","for","top-k","sampling",".","-","`","top_p","`","(","float",",","optional",")",":","This","value","sets","the","limit","for","top-p","(","nucleus",")","sampling",".","-","`","repetition_penalty","`","(","float",",","optional",")",":","This","helps","apply","the","repetition","penalty","during","text","generation",",","as","discussed","in","this","paper","."]
code: def get_config(cls):
      return {
          k: v
          for k, v in cls.__dict__.items()
          if not k.startswith("__")
          and not isinstance(
              v,
              (
                  types.FunctionType,
                  types.BuiltinFunctionType,
                  classmethod,
                  staticmethod,
              ),
          )
          and v is not None
      }
  
file_path: litellm/litellm/llms/petals.py
imports: import os, types
  import json
  from enum import Enum
  import requests
  import time
  from typing import Callable, Optional
  import litellm
  from litellm.utils import ModelResponse, Usage
  from .prompt_templates.factory import prompt_factory, custom_prompt
label_desc: Use image node_id 2 for calling the PetalsConfig obj's underlying member method code with example usage: obj.get_config(cls) and returns: unknown