Skip to content

Commit

Permalink
Update shared.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineJac authored Apr 25, 2024
1 parent fa5eaae commit 5588019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kong/llm/drivers/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5588019

Please sign in to comment.