mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Don't allow empty prompts. Context past always equal or greater than zero.
This commit is contained in:
parent
7e9ca06366
commit
659ab13665
1
llm.cpp
1
llm.cpp
@ -67,6 +67,7 @@ bool LLMObject::isModelLoaded() const
|
||||
void LLMObject::resetResponse()
|
||||
{
|
||||
s_ctx.n_past -= m_responseTokens;
|
||||
s_ctx.n_past = std::max(0, s_ctx.n_past);
|
||||
s_ctx.logits.erase(s_ctx.logits.end() -= m_responseLogits, s_ctx.logits.end());
|
||||
m_responseTokens = 0;
|
||||
m_responseLogits = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user