Skip to content

Commit 757e3a7

Browse files
committed
Fix typo with aggregator
1 parent 826db3a commit 757e3a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/voice_fn/processors/llm_context_aggregator.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ S: Start, E: End, T: Transcription, I: Interim, X: Text
7777
(do
7878
(when debug?
7979
(t/log! {:level :debug :id id} ["CONTEXT FRAME" frame-data]))
80-
[(assoc state :llm/context frame-data)])
80+
(let [tool-result? (= (-> frame-data last :role) :tool)]
81+
;; Send further to the llm processor if this ia tool call result
82+
[(assoc state :llm/context frame-data) (when tool-result? {:out [frame]})]))
8183

8284
(frame/user-speech-start? frame)
8385
,(do
@@ -297,7 +299,7 @@ S: Start, E: End, T: Transcription, I: Interim, X: Text
297299
:text (u/json-str tool-result)}]
298300
:tool_call_id tool-id})))
299301
(a/>!! tool-read (frame/llm-tool-call-result
300-
{:tole :tool
302+
{:role :tool
301303
:content [{:type :text
302304
:text "Tool not found"}]
303305
:tool_call_id tool-id}))))

0 commit comments

Comments
 (0)