From a1798fcea3a3773248fe9d9b9c5dd7757ae2b83e Mon Sep 17 00:00:00 2001 From: Antoine Jacquemin Date: Thu, 14 Mar 2024 06:43:24 +0100 Subject: [PATCH] Update handler.lua --- kong/plugins/ai-response-transformer/handler.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kong/plugins/ai-response-transformer/handler.lua b/kong/plugins/ai-response-transformer/handler.lua index cc223a4c0ce8..ea9542ff8593 100644 --- a/kong/plugins/ai-response-transformer/handler.lua +++ b/kong/plugins/ai-response-transformer/handler.lua @@ -116,9 +116,8 @@ function _M:access(conf) res_body = kong_utils.inflate_gzip(res_body) end - if kong.ctx.shared.ai_request then - kong.ctx.shared.parsed_response = res_body - end + -- pass res body for analytics + kong.ctx.shared.parsed_response = res_body -- if asked, introspect the request before proxying kong.log.debug("introspecting response with LLM")