TextAutoGenerateText::TextAutoGenerateTextReplyInfo Struct
struct TextAutoGenerateText::TextAutoGenerateTextReplyInfoThe TextAutoGenerateTextReplyInfo class represents information about a reply from an LLM. More...
| Header: | #include <textautogeneratetextreplyinfo.h> |
| CMake: | find_package(KF6TextAutoGenerateTextCore REQUIRED)target_link_libraries(mytarget PRIVATE KF6::TextAutoGenerateTextCore) |
Public Functions
| QString | generateReplyInfo() const |
| QString | generateReplyTypeInfoOllama() const |
| QString | generateReplyTypeInfoOpenAI() const |
Static Public Members
| TextAutoGenerateText::TextAutoGenerateTextReplyInfo::ReplyType | convertReplyTypeFromString(const QString &str) |
| QString | convertReplyTypeToString(TextAutoGenerateText::TextAutoGenerateTextReplyInfo::ReplyType type) |
| TextAutoGenerateText::TextAutoGenerateTextReplyInfo | deserialize(const QJsonObject &o) |
| QJsonObject | serialize(const TextAutoGenerateText::TextAutoGenerateTextReplyInfo &msg) |
Detailed Description
When an LLM generates a completion, the server generally will return some information about the completion, including the duration of the completion, the number of tokens received, and the duration of the prompt evaluation. This struct encapsulates such information. If any one of these fields is not available, it will be set to its default value.
Member Function Documentation
[static] TextAutoGenerateText::TextAutoGenerateTextReplyInfo::ReplyType TextAutoGenerateTextReplyInfo::convertReplyTypeFromString(const QString &str)
convertReplyTypeFromString str Returns
[static] QString TextAutoGenerateTextReplyInfo::convertReplyTypeToString(TextAutoGenerateText::TextAutoGenerateTextReplyInfo::ReplyType type)
convertReplyTypeToString type Returns
[static] TextAutoGenerateText::TextAutoGenerateTextReplyInfo TextAutoGenerateTextReplyInfo::deserialize(const QJsonObject &o)
Deserializes a TextAutoGenerateMessage object from JSON. o The JSON object to deserialize from Returns The deserialized TextAutoGenerateMessage
QString TextAutoGenerateTextReplyInfo::generateReplyInfo() const
generateReplyInfo Returns
QString TextAutoGenerateTextReplyInfo::generateReplyTypeInfoOllama() const
generateReplyTypeInfoOllama Returns
QString TextAutoGenerateTextReplyInfo::generateReplyTypeInfoOpenAI() const
generateReplyTypeInfoOpenAI Returns
[static] QJsonObject TextAutoGenerateTextReplyInfo::serialize(const TextAutoGenerateText::TextAutoGenerateTextReplyInfo &msg)
Serializes the given TextAutoGenerateMessage object. msg The TextAutoGenerateMessage to serialize toBinary true to serialize to binary format, false for JSON format Returns The serialized data as a QByteArray