OllamaInterface/OllamaClient.py

changeset 37
c0a8df8530ab
parent 34
2b3ed778af64
child 51
f8d0b051bee9
equal deleted inserted replaced
36:825c0f3a17ef 37:c0a8df8530ab
337 @param response dictionary containing the version response 337 @param response dictionary containing the version response
338 @type dict 338 @type dict
339 """ 339 """
340 with contextlib.suppress(KeyError): 340 with contextlib.suppress(KeyError):
341 self.serverVersion.emit(response["version"]) 341 self.serverVersion.emit(response["version"])
342 if self.__plugin.getPreferences("OllamaHeartbeatInterval") == 0: 342 if (
343 # implicit connectivity check 343 self.__plugin.getPreferences("OllamaHeartbeatInterval") == 0
344 and not self.__serverResponding
345 ):
346 # implicit connectivity check success
347 self.__serverResponding = True
344 self.serverStateChanged.emit(True, "") 348 self.serverStateChanged.emit(True, "")
345 349
346 def state(self): 350 def state(self):
347 """ 351 """
348 Public method to get the current client state. 352 Public method to get the current client state.

eric ide

mercurial