Revolyssup commented on code in PR #12515:
URL: https://github.com/apache/apisix/pull/12515#discussion_r2281442762
##########
apisix/plugins/ai-drivers/openai-base.lua:
##########
@@ -97,7 +99,7 @@ local function read_response(ctx, res)
ngx_print(chunk)
ngx_flush(true)
- local events, err = ngx_re.split(chunk, "\n")
+ local events, err = ngx_re.split(chunk, "\n\n")
Review Comment:
chunks here are actually separated by `\n\n` and logic was wrong previously
but not caught because we were extracting chunk by chunk.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]