14 Q_PROPERTY(QString
text READ
text CONSTANT FINAL)
27 const QVector<QVariant> &
context, const
bool in_progress = false,
28 QObject *parent =
nullptr);
32 [[nodiscard]] QString
text() const;
38 [[nodiscard]]
bool isUser() const;
42 [[nodiscard]] QVector<QVariant>
context() const;
59 QVector<QVariant> m_Context;
60 bool m_InProgress{
false};
The Message class represents a chat message.
Definition message.h:12
void setContext(const QVector< QVariant > &context)
Sets the context of the message.
Definition message.cpp:24
QVector< QVariant > context
Definition message.h:16
QString text
Definition message.h:14
void setInProgress(const bool in_progress)
Sets the in progress flag of the message.
Definition message.cpp:30
bool isUser
Definition message.h:15
void updateFromJson(const QJsonObject &json)
Updates the message from a JSON object.
Definition message.cpp:34
bool inProgress
Definition message.h:17
void setText(const QString text)
Sets the text of the message.
Definition message.cpp:18
Definition backend.cpp:11