Skip to content

Commit d07dc38

Browse files
committed
Add system-config frame test for user context aggregator
1 parent b0ab1be commit d07dc38

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/test/voice_fn/processors/llm_context_aggregator_test.clj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,15 @@
138138
(let [[new-context-state {:keys [out]}] (sut/user-aggregator-transform ststate nil (frame/llm-context new-context))
139139
context-frame (first out)]
140140
(:llm/context new-context-state) => new-context
141-
(:frame/data context-frame) => new-context)))))
141+
(:frame/data context-frame) => new-context)))
142+
(fact
143+
"Handles system-config-change frames"
144+
(let [nc {:messages [{:role :system
145+
:content "Your context was just updated"}]}]
146+
(sut/user-aggregator-transform
147+
sstate :sys-in
148+
(frame/system-config-change
149+
{:llm/context nc})) => [(assoc sstate :llm/context nc)]))))
142150

143151
(def chunk->frame (comp frame/llm-tool-call-chunk first :tool_calls :delta first :choices))
144152

@@ -275,6 +283,6 @@
275283
(let [nc {:messages [{:role :system
276284
:content "Your context was just updated"}]}]
277285
(sut/assistant-aggregator-transform
278-
sstate :in
286+
sstate :sys-in
279287
(frame/system-config-change
280288
{:llm/context nc})) => [(assoc sstate :llm/context nc)]))))

0 commit comments

Comments
 (0)