Function: gptel--handle-tool-result
gptel--handle-tool-result is a natively compiled function defined in
gptel-request.el.
Signature
(gptel--handle-tool-result FSM)
Documentation
Handle the results of tool execution in FSM.
Inject tool results into into the prompt data (for the LLM), run the callback (for the user), and transition the request state.
Source Code
;; Defined in /nix/store/q3r7g81pvghw7a523kjk2k2zih3pfk8z-emacs-packages-deps/share/emacs/site-lisp/elpa/gptel-20261002.545/gptel-request.el
(defun gptel--handle-tool-result (fsm)
"Handle the results of tool execution in FSM.
Inject tool results into into the prompt data (for the LLM), run the
callback (for the user), and transition the request state."
(let ((info (gptel-fsm-info fsm)))
(gptel--inject-prompt
(plist-get info :backend) (plist-get info :data)
(gptel--parse-tool-results (plist-get info :backend)
(plist-get info :tool-use)))
(funcall (plist-get info :callback)
(cons 'tool-result (plist-get info :tool-result)) info))
(gptel--fsm-transition fsm))