def get_model():
    """Gets model from model file

    Returns: (str) model
    """
    model = []
    model_name = ""
    # gets path of this script - OS independent
    path = dirname(abspath(getfile(currentframe()))) + "/.model.txt"
    try:
        # get appropriate api key
        with open(path) as f:
            model = [line.strip() for line in f]
        for m in model:
            if m.startswith("MODEL"):
                model_name = m.split('"')[1::2]
    except FileNotFoundError:
        print("Could not find model. Please make sure you've run the CLI "
              "tool and set up your model")
        quit("Exiting...")

    return model_name[0]
Gets model from model file

    Returns: (str) model
    
chatgdb/utils.py