mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
Update RedisMemoryStore.java
fix return - empty maps should return Mono.empty()
This commit is contained in:
+1
-1
@@ -222,7 +222,7 @@ public class RedisMemoryStore implements MemoryStore {
|
||||
|
||||
Map<String, String> map = this.client.hgetAll(String.format("%s:%s",
|
||||
collectionName, key).toLowerCase(Locale.ROOT));
|
||||
if (map == null) {
|
||||
if (map == null || map.isEmpty()) {
|
||||
return Mono.empty();
|
||||
}
|
||||
MemoryRecord record = RedisMemoryRecord.mapToRecord(map, withEmbedding);
|
||||
|
||||
Reference in New Issue
Block a user