ContextState + private AstNode fields: enforce token_ids invariant
AstNode fields are now private with read-only accessors. All mutation goes through ContextState methods (push, set_message, set_score, del) which guarantee token_ids stays in sync with text on every leaf. Also fix ResponseParser to use AstNode::tool_call() constructor, widen parsing module visibility to pub(crate). Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
29dc339f54
commit
6730d136d4
3 changed files with 124 additions and 42 deletions
|
|
@ -7,7 +7,7 @@
|
|||
// Set POC_DEBUG=1 for verbose per-turn logging.
|
||||
|
||||
pub mod http;
|
||||
mod parsing;
|
||||
pub(crate) mod parsing;
|
||||
mod types;
|
||||
mod openai;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue