OllamaInterface/Documentation/Source/Plugin_AI_Ollama.OllamaInterface.OllamaChatWidget.html

changeset 33
acc362920670
parent 18
0a5b9c233a6e
child 68
ca2e671f894e
diff -r 7dd8f8624522 -r acc362920670 OllamaInterface/Documentation/Source/Plugin_AI_Ollama.OllamaInterface.OllamaChatWidget.html
--- a/OllamaInterface/Documentation/Source/Plugin_AI_Ollama.OllamaInterface.OllamaChatWidget.html	Sat Sep 07 15:29:05 2024 +0200
+++ b/OllamaInterface/Documentation/Source/Plugin_AI_Ollama.OllamaInterface.OllamaChatWidget.html	Sat Sep 07 18:31:41 2024 +0200
@@ -19,6 +19,10 @@
 <h3>Classes</h3>
 <table>
 <tr>
+<td><a href="#OllamaChatDialog">OllamaChatDialog</a></td>
+<td>Class implementing a dialog showing the chat with the 'ollama' server.</td>
+</tr>
+<tr>
 <td><a href="#OllamaChatWidget">OllamaChatWidget</a></td>
 <td>Class implementing a widget showing the chat with the 'ollama' server.</td>
 </tr>
@@ -31,6 +35,108 @@
 
 <hr />
 <hr />
+<a NAME="OllamaChatDialog" ID="OllamaChatDialog"></a>
+<h2>OllamaChatDialog</h2>
+<p>
+    Class implementing a dialog showing the chat with the 'ollama' server.
+</p>
+
+<h3>Derived from</h3>
+QDialog
+<h3>Class Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#OllamaChatDialog.__init__">OllamaChatDialog</a></td>
+<td>Constructor</td>
+</tr>
+<tr>
+<td><a href="#OllamaChatDialog.getHistoryId">getHistoryId</a></td>
+<td>Public method to get the history ID of this chat.</td>
+</tr>
+<tr>
+<td><a href="#OllamaChatDialog.setHistory">setHistory</a></td>
+<td>Public method to add a list of messages to the view.</td>
+</tr>
+</table>
+
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+
+<a NAME="OllamaChatDialog.__init__" ID="OllamaChatDialog.__init__"></a>
+<h4>OllamaChatDialog (Constructor)</h4>
+<b>OllamaChatDialog</b>(<i>hid, title, model, parent=None</i>)
+<p>
+        Constructor
+</p>
+
+<dl>
+
+<dt><i>hid</i> (str)</dt>
+<dd>
+ID of the chat history
+</dd>
+<dt><i>title</i> (str)</dt>
+<dd>
+title of the chat
+</dd>
+<dt><i>model</i> (str)</dt>
+<dd>
+model name used for the chat
+</dd>
+<dt><i>parent</i> (QWidget (optional))</dt>
+<dd>
+reference to the parent widget (defaults to None)
+</dd>
+</dl>
+<a NAME="OllamaChatDialog.getHistoryId" ID="OllamaChatDialog.getHistoryId"></a>
+<h4>OllamaChatDialog.getHistoryId</h4>
+<b>getHistoryId</b>(<i></i>)
+<p>
+        Public method to get the history ID of this chat.
+</p>
+
+<dl>
+<dt>Return:</dt>
+<dd>
+DESCRIPTION
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+TYPE
+</dd>
+</dl>
+<a NAME="OllamaChatDialog.setHistory" ID="OllamaChatDialog.setHistory"></a>
+<h4>OllamaChatDialog.setHistory</h4>
+<b>setHistory</b>(<i>messages</i>)
+<p>
+        Public method to add a list of messages to the view.
+</p>
+
+<dl>
+
+<dt><i>messages</i> (list[dict[str, str]])</dt>
+<dd>
+list of chat messages
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
 <a NAME="OllamaChatWidget" ID="OllamaChatWidget"></a>
 <h2>OllamaChatWidget</h2>
 <p>
@@ -68,6 +174,10 @@
 <td>Public method to append a given message to the bottom most message box.</td>
 </tr>
 <tr>
+<td><a href="#OllamaChatWidget.clear">clear</a></td>
+<td>Public method to clear the list of messages.</td>
+</tr>
+<tr>
 <td><a href="#OllamaChatWidget.getHistoryId">getHistoryId</a></td>
 <td>Public method to get the history ID of this chat.</td>
 </tr>
@@ -118,7 +228,7 @@
 
 <a NAME="OllamaChatWidget.addMessage" ID="OllamaChatWidget.addMessage"></a>
 <h4>OllamaChatWidget.addMessage</h4>
-<b>addMessage</b>(<i>role, message</i>)
+<b>addMessage</b>(<i>role, message, scrollToBottom=True</i>)
 <p>
         Public method to add a new message.
 </p>
@@ -133,6 +243,11 @@
 <dd>
 message text
 </dd>
+<dt><i>scrollToBottom</i> (bool (optional))</dt>
+<dd>
+flag indicating to scroll the view to the bottom
+            (defaults to True)
+</dd>
 </dl>
 <a NAME="OllamaChatWidget.appendMessage" ID="OllamaChatWidget.appendMessage"></a>
 <h4>OllamaChatWidget.appendMessage</h4>
@@ -148,6 +263,13 @@
 message text to be appended
 </dd>
 </dl>
+<a NAME="OllamaChatWidget.clear" ID="OllamaChatWidget.clear"></a>
+<h4>OllamaChatWidget.clear</h4>
+<b>clear</b>(<i></i>)
+<p>
+        Public method to clear the list of messages.
+</p>
+
 <a NAME="OllamaChatWidget.getHistoryId" ID="OllamaChatWidget.getHistoryId"></a>
 <h4>OllamaChatWidget.getHistoryId</h4>
 <b>getHistoryId</b>(<i></i>)

eric ide

mercurial