chatllm: do not write uninitialized data to stream (#1486)

This commit is contained in:
cebtenzzre 2023-10-11 11:31:34 -04:00 committed by GitHub
parent 7a19047329
commit 04499d1c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -779,7 +779,7 @@ bool ChatLLM::serialize(QDataStream &stream, int version, bool serializeKV)
} }
if (version <= 3) { if (version <= 3) {
int responseLogits; int responseLogits = 0;
stream << responseLogits; stream << responseLogits;
} }
stream << m_ctx.n_past; stream << m_ctx.n_past;