gptel-ollama: Fix parsing error (#179)

* gptel-ollama.el (gptel-curl--parse-stream): Don't throw an error
when regex-searching.
This commit is contained in:
Karthik Chikmagalur 2024-04-27 20:14:17 -07:00
parent a2b16c43b1
commit 306fe3bd8c

View file

@ -44,8 +44,7 @@ Intended for internal use only.")
(cl-defmethod gptel-curl--parse-stream ((_backend gptel-ollama) info) (cl-defmethod gptel-curl--parse-stream ((_backend gptel-ollama) info)
"Parse response stream for the Ollama API." "Parse response stream for the Ollama API."
(when (bobp) (when (and (bobp) (re-search-forward "^{" nil t))
(re-search-forward "^{")
(forward-line 0)) (forward-line 0))
(let* ((content-strs) (content) (pt (point))) (let* ((content-strs) (content) (pt (point)))
(condition-case nil (condition-case nil