From 5588019e2ec9bdeb859dd9a0be5c997c5e21e8c3 Mon Sep 17 00:00:00 2001 From: Antoine Jacquemin Date: Thu, 25 Apr 2024 13:27:56 +0200 Subject: [PATCH] Update shared.lua --- kong/llm/drivers/shared.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kong/llm/drivers/shared.lua b/kong/llm/drivers/shared.lua index 03124ee2e69d..9cd1a0404db6 100644 --- a/kong/llm/drivers/shared.lua +++ b/kong/llm/drivers/shared.lua @@ -448,7 +448,7 @@ function _M.pre_request(conf, request_table) -- log tokens prompt for reports and billing local prompt_tokens, err = self:calculate_cost(request_table, {}, 1.0) - kong.ctx.shared.ai_reponse_tokens = (kong.ctx.shared.ai_reponse_tokens or 0) + prompt_tokens + kong.ctx.shared.ai_prompt_tokens = (kong.ctx.shared.ai_prompt_tokens or 0) + prompt_tokens return true, nil end