Added ability to remove all records from the database.
This commit is contained in:
@@ -11,6 +11,7 @@ public interface IQdrantService
|
||||
Task StoreAddressAsync(Address address, float[] embedding, CancellationToken cancellationToken = default);
|
||||
Task<List<AddressEmbedding>> SearchSimilarAddressesAsync(float[] queryEmbedding, int limit = 5, float scoreThreshold = 0.0f, CancellationToken cancellationToken = default);
|
||||
Task<List<AddressEmbedding>> GetAllAddressesAsync(CancellationToken cancellationToken = default);
|
||||
Task DeleteAllAddressesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
public class QdrantService : IQdrantService
|
||||
@@ -86,4 +87,9 @@ public class QdrantService : IQdrantService
|
||||
}
|
||||
return addresses;
|
||||
}
|
||||
|
||||
public async Task DeleteAllAddressesAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _client.DeleteAsync(_collectionName, filter: new Filter(), cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user