fix: truncate context logic
This commit is contained in:
@@ -13,8 +13,6 @@ void LlmTool::setContextSize(int value) {
|
||||
|
||||
int LlmTool::inlineBudgetChars() const {
|
||||
if (m_contextSize <= 0) return DefaultInlineChars;
|
||||
// About a quarter of the context window, clamped so tiny contexts
|
||||
// still get a usable result and huge ones stay sane.
|
||||
const int tokens =
|
||||
qBound(512, m_contextSize / 4, DefaultInlineChars / CharsPerToken);
|
||||
return tokens * CharsPerToken;
|
||||
|
||||
Reference in New Issue
Block a user