Skip to content

Commit

Permalink
fix(llm): remove duplicate snippet after rebase (#13444)
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion authored Aug 2, 2024
1 parent 4a3dacf commit 0f1f435
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions kong/llm/proxy/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -583,4 +567,4 @@ function _M:access(conf)

end

return _M
return _M

1 comment on commit 0f1f435

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:0f1f435077de9861b98ba1028f5604e7e43e53d7
Artifacts available https://github.com/Kong/kong/actions/runs/10212080626

Please sign in to comment.