164 <tr> |
164 <tr> |
165 <td><a href="#OllamaChatWidget.__scrollChatToBottom">__scrollChatToBottom</a></td> |
165 <td><a href="#OllamaChatWidget.__scrollChatToBottom">__scrollChatToBottom</a></td> |
166 <td>Private slot to scroll the chat scroll area to the bottom.</td> |
166 <td>Private slot to scroll the chat scroll area to the bottom.</td> |
167 </tr> |
167 </tr> |
168 <tr> |
168 <tr> |
|
169 <td><a href="#OllamaChatWidget.__setHeader">__setHeader</a></td> |
|
170 <td>Private method to set the header label.</td> |
|
171 </tr> |
|
172 <tr> |
169 <td><a href="#OllamaChatWidget.addMessage">addMessage</a></td> |
173 <td><a href="#OllamaChatWidget.addMessage">addMessage</a></td> |
170 <td>Public method to add a new message.</td> |
174 <td>Public method to add a new message.</td> |
171 </tr> |
175 </tr> |
172 <tr> |
176 <tr> |
173 <td><a href="#OllamaChatWidget.appendMessage">appendMessage</a></td> |
177 <td><a href="#OllamaChatWidget.appendMessage">appendMessage</a></td> |
174 <td>Public method to append a given message to the bottom most message box.</td> |
178 <td>Public method to append a given message to the bottom most message box.</td> |
|
179 </tr> |
|
180 <tr> |
|
181 <td><a href="#OllamaChatWidget.chatParametersChanged">chatParametersChanged</a></td> |
|
182 <td>Public slot to handle a change of the chat parameters.</td> |
175 </tr> |
183 </tr> |
176 <tr> |
184 <tr> |
177 <td><a href="#OllamaChatWidget.clear">clear</a></td> |
185 <td><a href="#OllamaChatWidget.clear">clear</a></td> |
178 <td>Public method to clear the list of messages.</td> |
186 <td>Public method to clear the list of messages.</td> |
179 </tr> |
187 </tr> |
224 <b>__scrollChatToBottom</b>(<i></i>) |
232 <b>__scrollChatToBottom</b>(<i></i>) |
225 <p> |
233 <p> |
226 Private slot to scroll the chat scroll area to the bottom. |
234 Private slot to scroll the chat scroll area to the bottom. |
227 </p> |
235 </p> |
228 |
236 |
|
237 <a NAME="OllamaChatWidget.__setHeader" ID="OllamaChatWidget.__setHeader"></a> |
|
238 <h4>OllamaChatWidget.__setHeader</h4> |
|
239 <b>__setHeader</b>(<i>title, model</i>) |
|
240 <p> |
|
241 Private method to set the header label. |
|
242 </p> |
|
243 |
|
244 <dl> |
|
245 |
|
246 <dt><i>title</i> (str)</dt> |
|
247 <dd> |
|
248 chat title |
|
249 </dd> |
|
250 <dt><i>model</i> (str)</dt> |
|
251 <dd> |
|
252 model of the chat |
|
253 </dd> |
|
254 </dl> |
229 <a NAME="OllamaChatWidget.addMessage" ID="OllamaChatWidget.addMessage"></a> |
255 <a NAME="OllamaChatWidget.addMessage" ID="OllamaChatWidget.addMessage"></a> |
230 <h4>OllamaChatWidget.addMessage</h4> |
256 <h4>OllamaChatWidget.addMessage</h4> |
231 <b>addMessage</b>(<i>role, message, scrollToBottom=True</i>) |
257 <b>addMessage</b>(<i>role, message, scrollToBottom=True</i>) |
232 <p> |
258 <p> |
233 Public method to add a new message. |
259 Public method to add a new message. |
261 <dt><i>message</i> (str)</dt> |
287 <dt><i>message</i> (str)</dt> |
262 <dd> |
288 <dd> |
263 message text to be appended |
289 message text to be appended |
264 </dd> |
290 </dd> |
265 </dl> |
291 </dl> |
|
292 <a NAME="OllamaChatWidget.chatParametersChanged" ID="OllamaChatWidget.chatParametersChanged"></a> |
|
293 <h4>OllamaChatWidget.chatParametersChanged</h4> |
|
294 <b>chatParametersChanged</b>(<i>_hid, title, model</i>) |
|
295 <p> |
|
296 Public slot to handle a change of the chat parameters. |
|
297 </p> |
|
298 |
|
299 <dl> |
|
300 |
|
301 <dt><i>_hid</i> (str)</dt> |
|
302 <dd> |
|
303 history ID (unused) |
|
304 </dd> |
|
305 <dt><i>title</i> (str)</dt> |
|
306 <dd> |
|
307 new chat title |
|
308 </dd> |
|
309 <dt><i>model</i> (str)</dt> |
|
310 <dd> |
|
311 new chat model |
|
312 </dd> |
|
313 </dl> |
266 <a NAME="OllamaChatWidget.clear" ID="OllamaChatWidget.clear"></a> |
314 <a NAME="OllamaChatWidget.clear" ID="OllamaChatWidget.clear"></a> |
267 <h4>OllamaChatWidget.clear</h4> |
315 <h4>OllamaChatWidget.clear</h4> |
268 <b>clear</b>(<i></i>) |
316 <b>clear</b>(<i></i>) |
269 <p> |
317 <p> |
270 Public method to clear the list of messages. |
318 Public method to clear the list of messages. |