codergpt.optimizer package

Submodules

codergpt.optimizer.optimizer module

Optimizer Module.

class codergpt.optimizer.optimizer.CodeOptimizer(chain)

Bases: object

Code Explainer class that extracts and explains code from a given file.

optimize(filename, function=None, classname=None, overwrite=False)

Optimize the the code by invoking the runnable chain.

Parameters:
  • path – The path to the code file to be explained.

  • function (Optional[str]) – The name of the function to explain. Default is None.

  • classname (Optional[str]) – The name of the class to explain. Default is None.

Module contents

Code optimization module.

class codergpt.optimizer.CodeOptimizer(chain)

Bases: object

Code Explainer class that extracts and explains code from a given file.

optimize(filename, function=None, classname=None, overwrite=False)

Optimize the the code by invoking the runnable chain.

Parameters:
  • path – The path to the code file to be explained.

  • function (Optional[str]) – The name of the function to explain. Default is None.

  • classname (Optional[str]) – The name of the class to explain. Default is None.