From 981259fb8bf36e3e70e5759faae1ef6920604130 Mon Sep 17 00:00:00 2001 From: firecoperana Date: Thu, 24 Jul 2025 13:49:11 -0500 Subject: [PATCH] bug fix no timings after tool update --- examples/server/server.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 42f0b17b..448244af 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -2889,7 +2889,11 @@ static std::vector format_partial_response_oaicompat(server_task_result ta }; streaming_chunks.push_back(finish_chunk); } - + if (server_task_result_dict.count(task_result.id) > 0) + { + for (auto& chunk : streaming_chunks) + chunk.push_back({ "timings", server_task_result_dict[task_result.id].timings.to_json() }); + } // Return streaming chunks (could be just final chunk if no diffs) if (!streaming_chunks.empty()) { return streaming_chunks;