estimate prompt tokens on restore so status bar isn't 0K
After restore_from_log + compact, set last_prompt_tokens from the budget's used() count instead of waiting for the first API call. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
41b3f50c91
commit
31302961e2
1 changed files with 3 additions and 0 deletions
|
|
@ -1003,6 +1003,9 @@ impl Agent {
|
||||||
all.len(), mem_count, conv_count);
|
all.len(), mem_count, conv_count);
|
||||||
self.context.entries = all;
|
self.context.entries = all;
|
||||||
self.compact();
|
self.compact();
|
||||||
|
// Estimate prompt tokens from budget so status bar isn't 0 on startup
|
||||||
|
let b = self.budget();
|
||||||
|
self.last_prompt_tokens = b.used() as u32;
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue