WIP: Fix mind/, dmn, UI layer — 35 errors remaining
mind/mod.rs and mind/dmn.rs fully migrated to AST types. user/context.rs, user/widgets.rs, user/chat.rs partially migrated. Killed working_stack tool, tokenize_conv_entry, context_old.rs. Remaining: learn.rs (22), oneshot.rs (5), subconscious.rs (3), chat.rs (3), widgets.rs (1), context.rs (1). Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
bf3e2a9b73
commit
d0d876e067
5 changed files with 99 additions and 141 deletions
|
|
@ -40,14 +40,14 @@ fn build_messages(
|
|||
filter: Filter,
|
||||
) -> Vec<serde_json::Value> {
|
||||
let mut msgs = Vec::new();
|
||||
for e in context.system.entries() {
|
||||
for e in context.system().entries() {
|
||||
msgs.push(serde_json::json!({"role": "system", "content": e.entry.message().content_text()}));
|
||||
}
|
||||
let ctx = context.render_context_message();
|
||||
if !ctx.is_empty() {
|
||||
msgs.push(serde_json::json!({"role": "user", "content": ctx}));
|
||||
}
|
||||
let entries = context.conversation.entries();
|
||||
let entries = context.conversation().entries();
|
||||
for i in range {
|
||||
let ce = &entries[i];
|
||||
let entry = &ce.entry;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue