Skip to content

Commit 89bd052

Browse files
committed
Fix errors caused by :null responses from DeepSeek R1
1 parent ae82a2c commit 89bd052

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

chatgpt-shell-openai.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,10 @@ Otherwise:
241241
(let-alist obj
242242
(mapconcat (lambda (choice)
243243
(let-alist choice
244-
(or .delta.content
245-
.message.content)))
244+
(or (and (not (eq .delta.content :null))
245+
.delta.content)
246+
.message.content
247+
"")))
246248
.choices "")))))
247249
(unless (string-empty-p text)
248250
(setq response (concat response text)))

0 commit comments

Comments
 (0)