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

Thu, 29 Aug 2024 13:15:36 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 29 Aug 2024 13:15:36 +0200
changeset 18
0a5b9c233a6e
child 33
acc362920670
permissions
-rw-r--r--

Generated source code documentation.

<!DOCTYPE html>
<html><head>
<title>Plugin_AI_Ollama.OllamaInterface.OllamaChatWidget</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>Plugin_AI_Ollama.OllamaInterface.OllamaChatWidget</h1>
<p>
Module implementing a widget showing the chat with the 'ollama' server.
</p>

<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Classes</h3>
<table>
<tr>
<td><a href="#OllamaChatWidget">OllamaChatWidget</a></td>
<td>Class implementing a widget showing the chat with the 'ollama' server.</td>
</tr>
</table>

<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>

<hr />
<hr />
<a NAME="OllamaChatWidget" ID="OllamaChatWidget"></a>
<h2>OllamaChatWidget</h2>
<p>
    Class implementing a widget showing the chat with the 'ollama' server.
</p>

<h3>Derived from</h3>
QWidget, Ui_OllamaChatWidget
<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="#OllamaChatWidget.__init__">OllamaChatWidget</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#OllamaChatWidget.__scrollChatToBottom">__scrollChatToBottom</a></td>
<td>Private slot to scroll the chat scroll area to the bottom.</td>
</tr>
<tr>
<td><a href="#OllamaChatWidget.addMessage">addMessage</a></td>
<td>Public method to add a new message.</td>
</tr>
<tr>
<td><a href="#OllamaChatWidget.appendMessage">appendMessage</a></td>
<td>Public method to append a given message to the bottom most message box.</td>
</tr>
<tr>
<td><a href="#OllamaChatWidget.getHistoryId">getHistoryId</a></td>
<td>Public method to get the history ID of this chat.</td>
</tr>
<tr>
<td><a href="#OllamaChatWidget.getRecentMessage">getRecentMessage</a></td>
<td>Public method to get the message of the last message box.</td>
</tr>
</table>

<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>


<a NAME="OllamaChatWidget.__init__" ID="OllamaChatWidget.__init__"></a>
<h4>OllamaChatWidget (Constructor)</h4>
<b>OllamaChatWidget</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="OllamaChatWidget.__scrollChatToBottom" ID="OllamaChatWidget.__scrollChatToBottom"></a>
<h4>OllamaChatWidget.__scrollChatToBottom</h4>
<b>__scrollChatToBottom</b>(<i></i>)
<p>
        Private slot to scroll the chat scroll area to the bottom.
</p>

<a NAME="OllamaChatWidget.addMessage" ID="OllamaChatWidget.addMessage"></a>
<h4>OllamaChatWidget.addMessage</h4>
<b>addMessage</b>(<i>role, message</i>)
<p>
        Public method to add a new message.
</p>

<dl>

<dt><i>role</i> (str)</dt>
<dd>
role of the message sender (one of 'user' or 'assistant')
</dd>
<dt><i>message</i> (str)</dt>
<dd>
message text
</dd>
</dl>
<a NAME="OllamaChatWidget.appendMessage" ID="OllamaChatWidget.appendMessage"></a>
<h4>OllamaChatWidget.appendMessage</h4>
<b>appendMessage</b>(<i>message</i>)
<p>
        Public method to append a given message to the bottom most message box.
</p>

<dl>

<dt><i>message</i> (str)</dt>
<dd>
message text to be appended
</dd>
</dl>
<a NAME="OllamaChatWidget.getHistoryId" ID="OllamaChatWidget.getHistoryId"></a>
<h4>OllamaChatWidget.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="OllamaChatWidget.getRecentMessage" ID="OllamaChatWidget.getRecentMessage"></a>
<h4>OllamaChatWidget.getRecentMessage</h4>
<b>getRecentMessage</b>(<i></i>)
<p>
        Public method to get the message of the last message box.
</p>

<dl>
<dt>Return:</dt>
<dd>
message content
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial