|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_AI_Ollama.OllamaInterface.OllamaChatMessageBox</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.OllamaChatMessageBox</h1> |
|
10 <p> |
|
11 Module implementing a message box widget showing the role and content of a message. |
|
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="#OllamaChatMessageBox">OllamaChatMessageBox</a></td> |
|
23 <td>Class implementing a message box widget showing the role and content of a message.</td> |
|
24 </tr> |
|
25 </table> |
|
26 |
|
27 <h3>Functions</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 |
|
32 <hr /> |
|
33 <hr /> |
|
34 <a NAME="OllamaChatMessageBox" ID="OllamaChatMessageBox"></a> |
|
35 <h2>OllamaChatMessageBox</h2> |
|
36 <p> |
|
37 Class implementing a message box widget showing the role and content of a message. |
|
38 </p> |
|
39 |
|
40 <h3>Derived from</h3> |
|
41 QWidget |
|
42 <h3>Class Attributes</h3> |
|
43 <table> |
|
44 <tr><td>None</td></tr> |
|
45 </table> |
|
46 |
|
47 <h3>Class Methods</h3> |
|
48 <table> |
|
49 <tr><td>None</td></tr> |
|
50 </table> |
|
51 |
|
52 <h3>Methods</h3> |
|
53 <table> |
|
54 <tr> |
|
55 <td><a href="#OllamaChatMessageBox.__init__">OllamaChatMessageBox</a></td> |
|
56 <td>Constructor</td> |
|
57 </tr> |
|
58 <tr> |
|
59 <td><a href="#OllamaChatMessageBox.appendMessage">appendMessage</a></td> |
|
60 <td>Public method to append the given message text to the current content.</td> |
|
61 </tr> |
|
62 <tr> |
|
63 <td><a href="#OllamaChatMessageBox.getMessage">getMessage</a></td> |
|
64 <td>Public method to get the message content.</td> |
|
65 </tr> |
|
66 </table> |
|
67 |
|
68 <h3>Static Methods</h3> |
|
69 <table> |
|
70 <tr><td>None</td></tr> |
|
71 </table> |
|
72 |
|
73 |
|
74 <a NAME="OllamaChatMessageBox.__init__" ID="OllamaChatMessageBox.__init__"></a> |
|
75 <h4>OllamaChatMessageBox (Constructor)</h4> |
|
76 <b>OllamaChatMessageBox</b>(<i>role, message, parent=None</i>) |
|
77 <p> |
|
78 Constructor |
|
79 </p> |
|
80 |
|
81 <dl> |
|
82 |
|
83 <dt><i>role</i> (str)</dt> |
|
84 <dd> |
|
85 role of the message sender (one of 'user' or 'assistant') |
|
86 </dd> |
|
87 <dt><i>message</i> (str)</dt> |
|
88 <dd> |
|
89 message text |
|
90 </dd> |
|
91 <dt><i>parent</i> (QWidget (optional))</dt> |
|
92 <dd> |
|
93 reference to the parent widget (defaults to None) |
|
94 </dd> |
|
95 </dl> |
|
96 <a NAME="OllamaChatMessageBox.appendMessage" ID="OllamaChatMessageBox.appendMessage"></a> |
|
97 <h4>OllamaChatMessageBox.appendMessage</h4> |
|
98 <b>appendMessage</b>(<i>msg</i>) |
|
99 <p> |
|
100 Public method to append the given message text to the current content. |
|
101 </p> |
|
102 |
|
103 <dl> |
|
104 |
|
105 <dt><i>msg</i> (str)</dt> |
|
106 <dd> |
|
107 message to be appended |
|
108 </dd> |
|
109 </dl> |
|
110 <a NAME="OllamaChatMessageBox.getMessage" ID="OllamaChatMessageBox.getMessage"></a> |
|
111 <h4>OllamaChatMessageBox.getMessage</h4> |
|
112 <b>getMessage</b>(<i></i>) |
|
113 <p> |
|
114 Public method to get the message content. |
|
115 </p> |
|
116 |
|
117 <dl> |
|
118 <dt>Return:</dt> |
|
119 <dd> |
|
120 message content |
|
121 </dd> |
|
122 </dl> |
|
123 <dl> |
|
124 <dt>Return Type:</dt> |
|
125 <dd> |
|
126 str |
|
127 </dd> |
|
128 </dl> |
|
129 <div align="right"><a href="#top">Up</a></div> |
|
130 <hr /> |
|
131 </body></html> |