Variable: gptel-request--handlers
gptel-request--handlers is a variable defined in gptel-request.el.
Value
((WAIT gptel--handle-wait) (TOOL gptel--handle-tool-use)
(TRET gptel--handle-tool-result) (DONE gptel--handle-post)
(ERRS gptel--handle-post) (ABRT gptel--handle-post))
Documentation
Alist specifying handlers for gptel's default state transitions.
Each entry is a list whose car is a request state (a symbol) and
whose cdr is a list of handler functions called when
transitioning to that state. The handlers are called in the
sequence that they appear in the list, and each function receives
the state machine as its only argument. Information about the
request state can be retrieved via the machine's INFO slot, see
gptel-fsm.
Handlers are responsible for doing state-related tasks (like
logging errors or inserting responses) and transitioning to the
next state by calling gptel--fsm-transition.
Handlers can be asynchronous, in which case the transition call should typically be placed in its callback.
Source Code
;; Defined in /nix/store/q3r7g81pvghw7a523kjk2k2zih3pfk8z-emacs-packages-deps/share/emacs/site-lisp/elpa/gptel-20261002.545/gptel-request.el
(defvar gptel-request--handlers
`((WAIT ,#'gptel--handle-wait)
(TOOL ,#'gptel--handle-tool-use)
(TRET ,#'gptel--handle-tool-result)
(DONE ,#'gptel--handle-post)
(ERRS ,#'gptel--handle-post)
(ABRT ,#'gptel--handle-post))
"Alist specifying handlers for gptel's default state transitions.
Each entry is a list whose car is a request state (a symbol) and
whose cdr is a list of handler functions called when
transitioning to that state. The handlers are called in the
sequence that they appear in the list, and each function receives
the state machine as its only argument. Information about the
request state can be retrieved via the machine's INFO slot, see
`gptel-fsm'.
Handlers are responsible for doing state-related tasks (like
logging errors or inserting responses) and transitioning to the
next state by calling `gptel--fsm-transition'.
Handlers can be asynchronous, in which case the transition call
should typically be placed in its callback.")