Skip to content

Commit

Permalink
allow deepseek spec to print out the last message with final stats
Browse files Browse the repository at this point in the history
  • Loading branch information
chottolabs committed Sep 8, 2024
1 parent 7fd9476 commit 23cdc39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/kznllm/specs/deepseek.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ local function handle_data(line)

if data and data:match '"delta":' then
local json = vim.json.decode(data)
if json.choices and json.choices[1] and json.choices[1].delta and json.choices[1].delta.content then
if json.choices and json.choices[1] and json.choices[1].delta and json.choices[1].delta.content and json.choices[1].delta.content ~= '' then
content = json.choices[1].delta.content
else
vim.print(data)
Expand Down

0 comments on commit 23cdc39

Please sign in to comment.