|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_AI_Ollama.OllamaInterface.OllamaPullProgressDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>Plugin_AI_Ollama.OllamaInterface.OllamaPullProgressDialog</h1> |
|
10 <p> |
|
11 Module implementing a dialog showing the progress of a model pull action.. |
|
12 </p> |
|
13 |
|
14 <h3>Global Attributes</h3> |
|
15 <table> |
|
16 <tr><td>None</td></tr> |
|
17 </table> |
|
18 |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#OllamaPullProgressBar">OllamaPullProgressBar</a></td> |
|
23 <td>Class implementing a progress bar allowing values outside the standard range.</td> |
|
24 </tr> |
|
25 <tr> |
|
26 <td><a href="#OllamaPullProgressDialog">OllamaPullProgressDialog</a></td> |
|
27 <td>Class implementing a dialog showing the progress of a model pull action.</td> |
|
28 </tr> |
|
29 </table> |
|
30 |
|
31 <h3>Functions</h3> |
|
32 <table> |
|
33 <tr><td>None</td></tr> |
|
34 </table> |
|
35 |
|
36 <hr /> |
|
37 <hr /> |
|
38 <a NAME="OllamaPullProgressBar" ID="OllamaPullProgressBar"></a> |
|
39 <h2>OllamaPullProgressBar</h2> |
|
40 <p> |
|
41 Class implementing a progress bar allowing values outside the standard range. |
|
42 </p> |
|
43 |
|
44 <h3>Derived from</h3> |
|
45 QProgressBar |
|
46 <h3>Class Attributes</h3> |
|
47 <table> |
|
48 <tr><td>None</td></tr> |
|
49 </table> |
|
50 |
|
51 <h3>Class Methods</h3> |
|
52 <table> |
|
53 <tr><td>None</td></tr> |
|
54 </table> |
|
55 |
|
56 <h3>Methods</h3> |
|
57 <table> |
|
58 <tr> |
|
59 <td><a href="#OllamaPullProgressBar.__init__">OllamaPullProgressBar</a></td> |
|
60 <td>Constructor</td> |
|
61 </tr> |
|
62 <tr> |
|
63 <td><a href="#OllamaPullProgressBar.maximum">maximum</a></td> |
|
64 <td>Public method to get the maximum value.</td> |
|
65 </tr> |
|
66 <tr> |
|
67 <td><a href="#OllamaPullProgressBar.setMaximum">setMaximum</a></td> |
|
68 <td>Public method to set the maximum value.</td> |
|
69 </tr> |
|
70 <tr> |
|
71 <td><a href="#OllamaPullProgressBar.setValue">setValue</a></td> |
|
72 <td>Public method to set the current value.</td> |
|
73 </tr> |
|
74 <tr> |
|
75 <td><a href="#OllamaPullProgressBar.value">value</a></td> |
|
76 <td>Public method to get the current value.</td> |
|
77 </tr> |
|
78 </table> |
|
79 |
|
80 <h3>Static Methods</h3> |
|
81 <table> |
|
82 <tr><td>None</td></tr> |
|
83 </table> |
|
84 |
|
85 |
|
86 <a NAME="OllamaPullProgressBar.__init__" ID="OllamaPullProgressBar.__init__"></a> |
|
87 <h4>OllamaPullProgressBar (Constructor)</h4> |
|
88 <b>OllamaPullProgressBar</b>(<i>parent=None</i>) |
|
89 <p> |
|
90 Constructor |
|
91 </p> |
|
92 |
|
93 <dl> |
|
94 |
|
95 <dt><i>parent</i> (QWidget (optional))</dt> |
|
96 <dd> |
|
97 reference to the parent widget (defaults to None) |
|
98 </dd> |
|
99 </dl> |
|
100 <a NAME="OllamaPullProgressBar.maximum" ID="OllamaPullProgressBar.maximum"></a> |
|
101 <h4>OllamaPullProgressBar.maximum</h4> |
|
102 <b>maximum</b>(<i></i>) |
|
103 <p> |
|
104 Public method to get the maximum value. |
|
105 </p> |
|
106 |
|
107 <dl> |
|
108 <dt>Return:</dt> |
|
109 <dd> |
|
110 maximum value |
|
111 </dd> |
|
112 </dl> |
|
113 <dl> |
|
114 <dt>Return Type:</dt> |
|
115 <dd> |
|
116 int |
|
117 </dd> |
|
118 </dl> |
|
119 <a NAME="OllamaPullProgressBar.setMaximum" ID="OllamaPullProgressBar.setMaximum"></a> |
|
120 <h4>OllamaPullProgressBar.setMaximum</h4> |
|
121 <b>setMaximum</b>(<i>value</i>) |
|
122 <p> |
|
123 Public method to set the maximum value. |
|
124 </p> |
|
125 |
|
126 <dl> |
|
127 |
|
128 <dt><i>value</i> (int)</dt> |
|
129 <dd> |
|
130 new maximum value |
|
131 </dd> |
|
132 </dl> |
|
133 <a NAME="OllamaPullProgressBar.setValue" ID="OllamaPullProgressBar.setValue"></a> |
|
134 <h4>OllamaPullProgressBar.setValue</h4> |
|
135 <b>setValue</b>(<i>value</i>) |
|
136 <p> |
|
137 Public method to set the current value. |
|
138 </p> |
|
139 |
|
140 <dl> |
|
141 |
|
142 <dt><i>value</i> (int)</dt> |
|
143 <dd> |
|
144 new value |
|
145 </dd> |
|
146 </dl> |
|
147 <a NAME="OllamaPullProgressBar.value" ID="OllamaPullProgressBar.value"></a> |
|
148 <h4>OllamaPullProgressBar.value</h4> |
|
149 <b>value</b>(<i></i>) |
|
150 <p> |
|
151 Public method to get the current value. |
|
152 </p> |
|
153 |
|
154 <dl> |
|
155 <dt>Return:</dt> |
|
156 <dd> |
|
157 current value |
|
158 </dd> |
|
159 </dl> |
|
160 <dl> |
|
161 <dt>Return Type:</dt> |
|
162 <dd> |
|
163 int |
|
164 </dd> |
|
165 </dl> |
|
166 <div align="right"><a href="#top">Up</a></div> |
|
167 <hr /> |
|
168 <hr /> |
|
169 <a NAME="OllamaPullProgressDialog" ID="OllamaPullProgressDialog"></a> |
|
170 <h2>OllamaPullProgressDialog</h2> |
|
171 <p> |
|
172 Class implementing a dialog showing the progress of a model pull action. |
|
173 </p> |
|
174 |
|
175 <h3>Signals</h3> |
|
176 <dl> |
|
177 |
|
178 <dt>abortPull()</dt> |
|
179 <dd> |
|
180 emitted to abort the current model pull operation |
|
181 </dd> |
|
182 </dl> |
|
183 <h3>Derived from</h3> |
|
184 QDialog, Ui_OllamaPullProgressDialog |
|
185 <h3>Class Attributes</h3> |
|
186 <table> |
|
187 <tr><td>None</td></tr> |
|
188 </table> |
|
189 |
|
190 <h3>Class Methods</h3> |
|
191 <table> |
|
192 <tr><td>None</td></tr> |
|
193 </table> |
|
194 |
|
195 <h3>Methods</h3> |
|
196 <table> |
|
197 <tr> |
|
198 <td><a href="#OllamaPullProgressDialog.__init__">OllamaPullProgressDialog</a></td> |
|
199 <td>Constructor</td> |
|
200 </tr> |
|
201 <tr> |
|
202 <td><a href="#OllamaPullProgressDialog.clear">clear</a></td> |
|
203 <td>Public method to clear the progress information.</td> |
|
204 </tr> |
|
205 <tr> |
|
206 <td><a href="#OllamaPullProgressDialog.closeEvent">closeEvent</a></td> |
|
207 <td>Protected method to handle a close event.</td> |
|
208 </tr> |
|
209 <tr> |
|
210 <td><a href="#OllamaPullProgressDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
211 <td>Private slot handling a button of the button box being clicked.</td> |
|
212 </tr> |
|
213 <tr> |
|
214 <td><a href="#OllamaPullProgressDialog.setFinished">setFinished</a></td> |
|
215 <td>Public method to set the finished state.</td> |
|
216 </tr> |
|
217 <tr> |
|
218 <td><a href="#OllamaPullProgressDialog.setModel">setModel</a></td> |
|
219 <td>Public method to show the model name in the header.</td> |
|
220 </tr> |
|
221 <tr> |
|
222 <td><a href="#OllamaPullProgressDialog.setStatus">setStatus</a></td> |
|
223 <td>Public method to show the status update.</td> |
|
224 </tr> |
|
225 <tr> |
|
226 <td><a href="#OllamaPullProgressDialog.showError">showError</a></td> |
|
227 <td>Public method to show an error message reported by the server.</td> |
|
228 </tr> |
|
229 </table> |
|
230 |
|
231 <h3>Static Methods</h3> |
|
232 <table> |
|
233 <tr><td>None</td></tr> |
|
234 </table> |
|
235 |
|
236 |
|
237 <a NAME="OllamaPullProgressDialog.__init__" ID="OllamaPullProgressDialog.__init__"></a> |
|
238 <h4>OllamaPullProgressDialog (Constructor)</h4> |
|
239 <b>OllamaPullProgressDialog</b>(<i>parent=None</i>) |
|
240 <p> |
|
241 Constructor |
|
242 </p> |
|
243 |
|
244 <dl> |
|
245 |
|
246 <dt><i>parent</i> (QWidget (optional))</dt> |
|
247 <dd> |
|
248 reference to the parent widget (defaults to None) |
|
249 </dd> |
|
250 </dl> |
|
251 <a NAME="OllamaPullProgressDialog.clear" ID="OllamaPullProgressDialog.clear"></a> |
|
252 <h4>OllamaPullProgressDialog.clear</h4> |
|
253 <b>clear</b>(<i></i>) |
|
254 <p> |
|
255 Public method to clear the progress information. |
|
256 </p> |
|
257 |
|
258 <a NAME="OllamaPullProgressDialog.closeEvent" ID="OllamaPullProgressDialog.closeEvent"></a> |
|
259 <h4>OllamaPullProgressDialog.closeEvent</h4> |
|
260 <b>closeEvent</b>(<i>evt</i>) |
|
261 <p> |
|
262 Protected method to handle a close event. |
|
263 </p> |
|
264 |
|
265 <dl> |
|
266 |
|
267 <dt><i>evt</i> (QCloseEvent)</dt> |
|
268 <dd> |
|
269 reference to the close event object |
|
270 </dd> |
|
271 </dl> |
|
272 <a NAME="OllamaPullProgressDialog.on_buttonBox_clicked" ID="OllamaPullProgressDialog.on_buttonBox_clicked"></a> |
|
273 <h4>OllamaPullProgressDialog.on_buttonBox_clicked</h4> |
|
274 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
275 <p> |
|
276 Private slot handling a button of the button box being clicked. |
|
277 </p> |
|
278 |
|
279 <dl> |
|
280 |
|
281 <dt><i>button</i> (QAbstractButton)</dt> |
|
282 <dd> |
|
283 reference to the clicked button |
|
284 </dd> |
|
285 </dl> |
|
286 <a NAME="OllamaPullProgressDialog.setFinished" ID="OllamaPullProgressDialog.setFinished"></a> |
|
287 <h4>OllamaPullProgressDialog.setFinished</h4> |
|
288 <b>setFinished</b>(<i>finished</i>) |
|
289 <p> |
|
290 Public method to set the finished state. |
|
291 </p> |
|
292 |
|
293 <dl> |
|
294 |
|
295 <dt><i>finished</i> (bool)</dt> |
|
296 <dd> |
|
297 flag indicating the finished state |
|
298 </dd> |
|
299 </dl> |
|
300 <a NAME="OllamaPullProgressDialog.setModel" ID="OllamaPullProgressDialog.setModel"></a> |
|
301 <h4>OllamaPullProgressDialog.setModel</h4> |
|
302 <b>setModel</b>(<i>model</i>) |
|
303 <p> |
|
304 Public method to show the model name in the header. |
|
305 </p> |
|
306 |
|
307 <dl> |
|
308 |
|
309 <dt><i>model</i> (str)</dt> |
|
310 <dd> |
|
311 model name |
|
312 </dd> |
|
313 </dl> |
|
314 <a NAME="OllamaPullProgressDialog.setStatus" ID="OllamaPullProgressDialog.setStatus"></a> |
|
315 <h4>OllamaPullProgressDialog.setStatus</h4> |
|
316 <b>setStatus</b>(<i>status, idStr, total, completed</i>) |
|
317 <p> |
|
318 Public method to show the status update. |
|
319 </p> |
|
320 |
|
321 <dl> |
|
322 |
|
323 <dt><i>status</i> (str)</dt> |
|
324 <dd> |
|
325 status message reported by the 'ollama' server |
|
326 </dd> |
|
327 <dt><i>idStr</i> (str)</dt> |
|
328 <dd> |
|
329 ID of the file being pulled or empty |
|
330 </dd> |
|
331 <dt><i>total</i> (int)</dt> |
|
332 <dd> |
|
333 size of the file being pulled or 0 in case of an empty ID |
|
334 </dd> |
|
335 <dt><i>completed</i> (int)</dt> |
|
336 <dd> |
|
337 downloaded bytes or 0 in case of an empty ID |
|
338 </dd> |
|
339 </dl> |
|
340 <a NAME="OllamaPullProgressDialog.showError" ID="OllamaPullProgressDialog.showError"></a> |
|
341 <h4>OllamaPullProgressDialog.showError</h4> |
|
342 <b>showError</b>(<i>errMsg</i>) |
|
343 <p> |
|
344 Public method to show an error message reported by the server. |
|
345 </p> |
|
346 |
|
347 <dl> |
|
348 |
|
349 <dt><i>errMsg</i> (str)</dt> |
|
350 <dd> |
|
351 error message |
|
352 </dd> |
|
353 </dl> |
|
354 <div align="right"><a href="#top">Up</a></div> |
|
355 <hr /> |
|
356 </body></html> |