Probe embeddings vector length.

This commit is contained in:
Bartosz Taudul
2025-05-23 01:43:02 +02:00
parent 746f28e3c9
commit e3db1eb7ee

View File

@@ -125,6 +125,18 @@ void TracyLlmTools::ManualEmbeddingsWorker( TracyLlmApi& api )
auto manual = Unembed( Manual );
size_t length;
{
nlohmann::json req;
req["input"] = "embeddings length probe";
req["model"] = m_manualEmbeddingState.model;
nlohmann::json response;
api.Embeddings( req, response );
length = response["data"][0]["embedding"].size();
}
const auto sz = (int)manual->size();
const auto chunks = ( sz + Chunk - 1 ) / Chunk;
for( int i=0; i<chunks; i++ )