feat: supports reasoning_content (#1159)
This commit is contained in:
@@ -139,6 +139,8 @@ M._stream = function(opts)
|
||||
---@type AvanteCurlOutput
|
||||
local spec = Provider.parse_curl_args(Provider, code_opts)
|
||||
|
||||
local resp_ctx = {}
|
||||
|
||||
---@param line string
|
||||
local function parse_stream_data(line)
|
||||
local event = line:match("^event: (.+)$")
|
||||
@@ -147,7 +149,7 @@ M._stream = function(opts)
|
||||
return
|
||||
end
|
||||
local data_match = line:match("^data: (.+)$")
|
||||
if data_match then Provider.parse_response(data_match, current_event_state, handler_opts) end
|
||||
if data_match then Provider.parse_response(resp_ctx, data_match, current_event_state, handler_opts) end
|
||||
end
|
||||
|
||||
local function parse_response_without_stream(data)
|
||||
|
||||
Reference in New Issue
Block a user