File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 6565 restart_app ,
6666 show_message_box_after_change_to_restart ,
6767 set_auto_start_windows ,
68- init_llama ,
68+ init_llama , set_api_key ,
6969)
7070from pyqt_openai .widgets .navWidget import NavBar
7171
@@ -102,7 +102,7 @@ def __initUi(self):
102102 self .__setTrayMenu ()
103103 self .__setToolBar ()
104104
105- init_llama ()
105+ self . __loadApiKeys ()
106106
107107 self .setCentralWidget (self .__mainWidget )
108108 self .resize (* APP_INITIAL_WINDOW_SIZE )
@@ -112,6 +112,11 @@ def __initUi(self):
112112 self .__customizeParamsContainer
113113 )
114114
115+ def __loadApiKeys (self ):
116+ set_api_key ('OPENAI_API_KEY' , CONFIG_MANAGER .get_general_property ('OPENAI_API_KEY' ))
117+ set_api_key ('REPLICATE_API_KEY' , CONFIG_MANAGER .get_general_property ('REPLICATE_API_KEY' ))
118+ init_llama ()
119+
115120 def __setActions (self ):
116121 self .__langAction = QAction ()
117122
You can’t perform that action at this time.
0 commit comments