gptel-curl: Fix process sentinel

* gptel-curl.el (gptel-curl--sentinel): Use `process-status' instead of trying
to match on the string passed to he process sentinel as the status.
This commit is contained in:
Karthik Chikmagalur 2023-03-18 00:51:49 -07:00
parent 051501c892
commit 87d9090b7a

View file

@ -93,7 +93,7 @@ PROCESS and STATUS are process parameters."
(when gptel--debug (when gptel--debug
(with-current-buffer proc-buf (with-current-buffer proc-buf
(clone-buffer "*gptel-error*" 'show))) (clone-buffer "*gptel-error*" 'show)))
(if-let* (((equal status "finished\n")) (if-let* (((eq (process-status process) 'exit))
(proc-info (alist-get process gptel-curl--process-alist)) (proc-info (alist-get process gptel-curl--process-alist))
(proc-token (plist-get proc-info :token)) (proc-token (plist-get proc-info :token))
(response (gptel-curl--parse-response proc-buf proc-token))) (response (gptel-curl--parse-response proc-buf proc-token)))