codergpt.explainer package
Submodules
codergpt.explainer.explainer module
Explainer Module.
- class codergpt.explainer.explainer.CodeExplainer(chain)
Bases:
object
Code Explainer class that extracts and explains code from a given file.
- explain(code, function=None, classname=None, language=None)
Explain the contents of the code file by invoking the runnable chain.
- Parameters:
code (
str
) – The code 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 explanation module.
- class codergpt.explainer.CodeExplainer(chain)
Bases:
object
Code Explainer class that extracts and explains code from a given file.
- explain(code, function=None, classname=None, language=None)
Explain the contents of the code file by invoking the runnable chain.
- Parameters:
code (
str
) – The code 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.