2023-04-15 08:19:09 +00:00
|
|
|
# File : extension.py
|
|
|
|
# Author : ParisNeo
|
|
|
|
# Description :
|
|
|
|
# This is the main class to be imported by the extension
|
|
|
|
# it gives your code access to the model, the callback functions, the model conditionning etc
|
|
|
|
from config import load_config, save_config
|
|
|
|
|
2023-04-20 17:30:03 +00:00
|
|
|
__author__ = "parisneo"
|
2023-05-26 10:11:14 +00:00
|
|
|
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
|
2023-04-20 17:30:03 +00:00
|
|
|
__copyright__ = "Copyright 2023, "
|
|
|
|
__license__ = "Apache 2.0"
|
|
|
|
|
2023-04-15 08:19:09 +00:00
|
|
|
class Extension():
|
2023-04-18 21:41:51 +00:00
|
|
|
def __init__(self, metadata_file_path:str, app) -> None:
|
|
|
|
self.app = app
|
|
|
|
self.metadata_file_path = metadata_file_path
|
|
|
|
self.config = load_config(metadata_file_path)
|
|
|
|
|