OllamaInterface/RunOllamaServerDialog.py

changeset 8
3118d16e526e
parent 7
eb1dec15b2f0
child 14
08932ee12a69
equal deleted inserted replaced
7:eb1dec15b2f0 8:3118d16e526e
74 self.__process.start(command, args) 74 self.__process.start(command, args)
75 ok = self.__process.waitForStarted(10000) 75 ok = self.__process.waitForStarted(10000)
76 if not ok: 76 if not ok:
77 EricMessageBox.critical( 77 EricMessageBox.critical(
78 None, 78 None,
79 self.tr("Run Local ollama Server"), 79 self.tr("Run Local 'ollama' Server"),
80 self.tr("""The loacl ollama server process could not be started."""), 80 self.tr("""The loacl 'ollama' server process could not be started."""),
81 ) 81 )
82 else: 82 else:
83 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled( 83 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(
84 False 84 False
85 ) 85 )
138 @pyqtSlot() 138 @pyqtSlot()
139 def on_stopServerButton_clicked(self): 139 def on_stopServerButton_clicked(self):
140 """ 140 """
141 Private slot to stop the running server. 141 Private slot to stop the running server.
142 """ 142 """
143 self.__process.terminate() 143 if self.__process is not None:
144 self.__process.terminate()
144 145
145 @pyqtSlot() 146 @pyqtSlot()
146 def on_restartServerButton_clicked(self): 147 def on_restartServerButton_clicked(self):
147 """ 148 """
148 Private slot to re-start the ollama server. 149 Private slot to re-start the ollama server.

eric ide

mercurial