Skip to content

Commit 8ecc6ee

Browse files
committed
Assistant context aggregator with tool call support
1 parent 0505990 commit 8ecc6ee

File tree

4 files changed

+266
-177
lines changed

4 files changed

+266
-177
lines changed

core/src/voice_fn/frame.clj

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@
169169
"Chunk of text from streaming LLM output"
170170
{:type :frame.llm/text-chunk})
171171

172+
(defframe llm-tool-call-chunk
173+
"Chunk of tool call request. Needs to be assembled before use."
174+
{:type :frame.llm/tool-call-chunk})
175+
176+
(defframe llm-tool-call-result
177+
"Frame containing the result of invoking a tool for the LLM."
178+
{:type :frame.llm/tool-call-result})
179+
172180
(defframe llm-text-sentence
173181
"Complete sentence from LLM output"
174182
{:type :frame.llm/text-sentence})
@@ -181,18 +189,6 @@
181189
"Indicates the end of an LLM response"
182190
{:type :frame.llm/response-end})
183191

184-
(defframe llm-tools-call-request
185-
"Frame containing a tool call request. Used when the LLM assistant wants to
186-
invoke a function to answer a user question. A tool-call-request should contain:
187-
- :function-name - name of the function to call (this needs to be registered at pipeline creation)
188-
189-
- :arguments - map of arguments (as described in the function registration)
190-
191-
- :tool-call-id - the call-id. When the result is pushed back to the LLM
192-
assistant, it will recognize the results based on this ID
193-
"
194-
{:type :frame.llm/tool-request})
195-
196192
;;
197193
;; User Interaction Frames
198194
;; Frames for handling user speech events

0 commit comments

Comments
 (0)