From 7e0476a641dd43e4726dcfd02429090d52a7802d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 11 Jun 2025 23:06:26 +0200 Subject: [PATCH] Fail when embeddings were not calculated. --- profiler/src/profiler/TracyLlmTools.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyLlmTools.cpp b/profiler/src/profiler/TracyLlmTools.cpp index 41dd8060..90b737f4 100644 --- a/profiler/src/profiler/TracyLlmTools.cpp +++ b/profiler/src/profiler/TracyLlmTools.cpp @@ -336,7 +336,12 @@ void TracyLlmTools::ManualEmbeddingsWorker( TracyLlmApi& api ) req["model"] = m_manualEmbeddingState.model; nlohmann::json response; - api.Embeddings( req, response ); + if( !api.Embeddings( req, response ) ) + { + m_manualEmbeddingState.inProgress = false; + m_manualEmbeddingState.done = false; + return; + } auto& data = response["data"]; for( size_t j=0; j