Prelim support for past context.

This commit is contained in:
Adam Treat
2023-04-09 10:27:35 -04:00
parent 9c0b216e7c
commit c763d4737d
3 changed files with 23 additions and 13 deletions

View File

@@ -75,7 +75,8 @@ bool GPTJObject::prompt(const QString &prompt)
m_stopGenerating = false;
auto func = std::bind(&GPTJObject::handleResponse, this, std::placeholders::_1);
emit responseStarted();
m_gptj->prompt(prompt.toStdString(), func);
static GPTJ::PromptContext ctx;
m_gptj->prompt(prompt.toStdString(), func, ctx, 4096 /*number of chars to predict*/);
emit responseStopped();
return true;
}