39 "shortDescription": "Graphical 'ollama' client for eric-ide.", |
39 "shortDescription": "Graphical 'ollama' client for eric-ide.", |
40 "longDescription": ( |
40 "longDescription": ( |
41 "Plug-in implementing an 'ollama' client and interface widgets." |
41 "Plug-in implementing an 'ollama' client and interface widgets." |
42 ), |
42 ), |
43 "needsRestart": False, |
43 "needsRestart": False, |
|
44 "hasCompiledForms": True, |
44 "pyqtApi": 2, |
45 "pyqtApi": 2, |
45 } |
46 } |
46 # End-Of-Header |
47 # End-Of-Header |
47 |
48 |
48 error = "" # noqa: U200 |
49 error = "" # noqa: U200 |
134 "OllamaPort": 11434, |
135 "OllamaPort": 11434, |
135 "OllamaLocalPort": 11435, # port for locally started ollama server |
136 "OllamaLocalPort": 11435, # port for locally started ollama server |
136 "OllamaHeartbeatInterval": 5, # 5 seconds heartbeat time; 0 = disabled |
137 "OllamaHeartbeatInterval": 5, # 5 seconds heartbeat time; 0 = disabled |
137 "StreamingChatResponse": True, |
138 "StreamingChatResponse": True, |
138 "OllamaModelLibraryUrl": "https://ollama.com/library", |
139 "OllamaModelLibraryUrl": "https://ollama.com/library", |
|
140 "OllamaDownloadUrl": "https://ollama.com/download", |
|
141 "OllamaBlogUrl": "https://ollama.com/blog", |
139 } |
142 } |
140 |
143 |
141 self.__translator = None |
144 self.__translator = None |
142 self.__loadTranslator() |
145 self.__loadTranslator() |
143 |
146 |
285 return Globals.toBool( |
288 return Globals.toBool( |
286 Preferences.Prefs.settings.value( |
289 Preferences.Prefs.settings.value( |
287 self.PreferencesKey + "/" + key, self.__defaults[key] |
290 self.PreferencesKey + "/" + key, self.__defaults[key] |
288 ) |
291 ) |
289 ) |
292 ) |
290 elif key in ("OllamaHost", "OllamaModelLibraryUrl"): |
293 elif key in ( |
|
294 "OllamaHost", |
|
295 "OllamaModelLibraryUrl", |
|
296 "OllamaDownloadUrl", |
|
297 "OllamaBlogUrl", |
|
298 ): |
291 value = Preferences.Prefs.settings.value( |
299 value = Preferences.Prefs.settings.value( |
292 self.PreferencesKey + "/" + key, self.__defaults[key] |
300 self.PreferencesKey + "/" + key, self.__defaults[key] |
293 ) |
301 ) |
294 if not value: |
302 if not value: |
295 # use default value if empty |
303 # use default value if empty |