OllamaInterface/OllamaHistoryWidget.py

changeset 6
d8064fb63eac
parent 5
6e8af43d537d
child 10
734921ab2b89
diff -r 6e8af43d537d -r d8064fb63eac OllamaInterface/OllamaHistoryWidget.py
--- a/OllamaInterface/OllamaHistoryWidget.py	Tue Aug 06 18:18:39 2024 +0200
+++ b/OllamaInterface/OllamaHistoryWidget.py	Wed Aug 07 18:19:25 2024 +0200
@@ -177,3 +177,15 @@
             }
         )
         self.dataChanged.emit(self.__id)
+
+    def checkModelAvailable(self, modelNames):
+        """
+        Public method to set the enabled state depending on available models.
+
+        @param modelNames names of available models
+        @type str
+        """
+        available = self.__model in modelNames
+
+        self.newChatButton.setEnabled(available)
+        self.editButton.setEnabled(available)

eric ide

mercurial