From 0f1f435077de9861b98ba1028f5604e7e43e53d7 Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Fri, 2 Aug 2024 15:57:28 +0800 Subject: [PATCH] fix(llm): remove duplicate snippet after rebase (#13444) https://konghq.atlassian.net/browse/KAG-5067 --- kong/llm/proxy/handler.lua | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/kong/llm/proxy/handler.lua b/kong/llm/proxy/handler.lua index 43e096c44b2d..de028bd7ee43 100644 --- a/kong/llm/proxy/handler.lua +++ b/kong/llm/proxy/handler.lua @@ -165,22 +165,6 @@ local function handle_streaming_frame(conf) return end - if not events then - -- usually a not-supported-transformer or empty frames. - -- header_filter has already run, so all we can do is log it, - -- and then send the client a readable error in a single chunk - local response = ERROR__NOT_SET - - if is_gzip then - response = kong_utils.deflate_gzip(response) - end - - ngx.arg[1] = response - ngx.arg[2] = true - - return - end - for _, event in ipairs(events) do local formatted, _, metadata = ai_driver.from_format(event, conf.model, "stream/" .. conf.route_type) @@ -583,4 +567,4 @@ function _M:access(conf) end -return _M \ No newline at end of file +return _M