-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add support for <think></think> tag. #1115
Comments
I was able to strip out the think preamble like this: parse_stream_data = function(data, handler_opts)
local json_data = vim.fn.json_decode(data)
if json_data then
-- Check for final message with "done: true"
if json_data.done then
handler_opts.on_complete(nil) -- Signal completion
return
end
if json_data.message and json_data.message.content then
local content = json_data.message.content
-- Track and accumulate content after <think> tag
if not handler_opts.in_think_block and content:match("<think>") then
handler_opts.in_think_block = true
return
end
if handler_opts.in_think_block and content:match("</think>") then
handler_opts.in_think_block = false
return
end
-- Only pass content when not in think block
if not handler_opts.in_think_block and content ~= "" then
handler_opts.on_chunk(content)
end
end
end
end, If your using |
can we make it gray + maybe closeable? not everytime you wanna see what is AI thinking before answering, and feel's like a good idea to make it grayish color... |
@braveltd Do you happen to know why it's not rendering the |
@weizheheng you're using deepseek-reasoner, not DeepSeek-R1. |
Ah, let me try it out thank you. Cause on their API doc, it mentioned that deepseek-reasoner points to the new model DeepSeek-R1. |
@weizheheng i use hyperbolic as my provider. try to use hyperbolic (xyz) or kluster (ai). they give free credits and good for testing and using. (not sponsored ofc) sorry if that is forbidden to tell that here. im new bro 👑 |
yes. i should from 2ead26f! |
Feature request
I tried DeepSeek-R1 today, and noticed. It generated before each generation
i think avante should support it, and make it kinda darker (much less visible) or smth.
or maybe i just dont know how to use this model yet!))
Motivation
Ugly ahhh tags at the start of each generation....
Other
No response
The text was updated successfully, but these errors were encountered: