Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gptel-request.el
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,7 @@ MACHINE is an instance of `gptel-fsm'"
;; Reset some flags in info. This is necessary when reusing fsm's context for
;; a second network request: gptel tests for the presence of these flags to
;; handle state transitions. (NOTE: Don't add :token to this.)
(run-hooks 'gptel-post-request-hook)
(let ((info (gptel-fsm-info fsm)))
(dolist (key '(:tool-success :tool-use :error :http-status :reasoning))
(when (plist-get info key)
Expand All @@ -1665,8 +1666,7 @@ MACHINE is an instance of `gptel-fsm'"
(if gptel-use-curl
#'gptel-curl-get-response
#'gptel--url-get-response)
fsm)
(run-hooks 'gptel-post-request-hook))
fsm))

(defun gptel--handle-tool-use (fsm)
"Run tool calls captured in FSM, and advance the state machine with the results."
Expand Down