INNER CODE UNIT · Python

main

gorilla-llm/gorilla-cli · go_cli.py:187

def main():
    def execute_command(cmd):
        cmd = format_command(cmd)
        process = subprocess.run(cmd, shell=True, stderr=subprocess.PIPE)

        save = not cmd.startswith(':')
        if save:
            append_string_to_file_if_missing(HISTORY_FILE, cmd)

        error_msg = process.stderr.decode("utf-8", "ignore")
        if error_msg:
            print(f"{error_msg}")
            return error_msg
        return str(process.returncode)

    def get_history_commands(history_file):
        """
        Takes in history file

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…