Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apisix/cli/ngx_tpl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,10 @@ http {
set $request_type 'traditional_http';
set $request_llm_model '';

set $llm_time_to_first_token '0';
set $llm_time_to_first_token '';
set $llm_model '';
set $llm_prompt_tokens '0';
set $llm_completion_tokens '0';
set $llm_prompt_tokens '';
set $llm_completion_tokens '';


access_by_lua_block {
Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/ai-drivers/openai-base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ local function read_response(ctx, res)
return
end

if ctx.var.llm_time_to_first_token == "0" then
if ctx.var.llm_time_to_first_token == "" then
ctx.var.llm_time_to_first_token = math.floor(
(ngx_now() - ctx.llm_request_start_time) * 1000)
end
Expand Down
Loading