[mob] Keep fetching embeddings till no embedding is returned (#1709)

## Description

## Tests
This commit is contained in:
Neeraj Gupta 2024-05-13 15:51:29 +05:30 committed by GitHub
commit 282611610d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,9 +145,12 @@ class EmbeddingStore {
}
_logger.info("${remoteEmbeddings.length} embeddings fetched");
return RemoteEmbeddings(
remoteEmbeddings,
remoteEmbeddings.length == limit,
// keep fetching until we get all embeddings. Avoid limit check as
// some embedding fetch might fail on server
remoteEmbeddings.isNotEmpty,
);
}