forked from kent/consciousness
Branch::tokens() was calling tokenizer::encode() on every call for
the role header ("system\n", "user\n", "assistant\n") and trailing
newline. In trim_conversation(), this meant hundreds of encode calls
per trim cycle.
These are fixed strings - cache them with OnceLock on first use.
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
|
||
|---|---|---|
| .. | ||
| agent | ||
| bin | ||
| cli | ||
| hippocampus | ||
| learn | ||
| mind | ||
| subconscious | ||
| thalamus | ||
| user | ||
| config.rs | ||
| lib.rs | ||
| locks.rs | ||
| main.rs | ||
| session.rs | ||
| util.rs | ||