Fix bug when 0 embeddings are returned
This commit is contained in:
parent
289fbc8a11
commit
b9cd9cf9cd
1 changed files with 3 additions and 0 deletions
|
@ -117,6 +117,9 @@ class EmbeddingStore {
|
||||||
Future<void> _storeRemoteEmbeddings(
|
Future<void> _storeRemoteEmbeddings(
|
||||||
List<RemoteEmbedding> remoteEmbeddings,
|
List<RemoteEmbedding> remoteEmbeddings,
|
||||||
) async {
|
) async {
|
||||||
|
if (remoteEmbeddings.isEmpty) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final embeddings = <Embedding>[];
|
final embeddings = <Embedding>[];
|
||||||
for (final embedding in remoteEmbeddings) {
|
for (final embedding in remoteEmbeddings) {
|
||||||
final file = await FilesDB.instance.getAnyUploadedFile(embedding.fileID);
|
final file = await FilesDB.instance.getAnyUploadedFile(embedding.fileID);
|
||||||
|
|
Loading…
Add table
Reference in a new issue