INNER CODE UNIT · Python

AutoDoc

awekrx/AutoDoc-ChatGPT · modules/autodoc.py:19

class AutoDoc:
    def __init__(self, config: str, code: str, language: str):
        self.__config = config

        self.__code = code
        if not isinstance(self.__code, str):
            exit(f"[{RED}Error{RESET}] Code is must be a string")
        elif len(self.__code) == 0:
            exit(f"[{RED}Error{RESET}] Code is empty")

        self.__language = language
        if not self.__language in Settings.supported_languages:
            exit(f"[{RED}Error{RESET}] .{self.__language} language not supported")

    def __ask(self, code) -> str:
        response = None
        conversation = None
        try:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…