Skip to content

Commit abe0ecd

Browse files
committed
Attempt to fix dupe data in tests with unique indexes
1 parent ec5fa87 commit abe0ecd

File tree

5 files changed

+43
-525
lines changed

5 files changed

+43
-525
lines changed

redisvl/extensions/cache/llm/langcache_api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(
2121
distance_threshold: float = 0.1,
2222
ttl: Optional[int] = None,
2323
redis_url: str = "redis://localhost:6379",
24-
connection_kwargs: Dict[str, Any] = {},
24+
connection_kwargs: Optional[Dict[str, Any]] = None,
2525
overwrite: bool = False,
2626
entry_scope: Scope = None,
2727
**kwargs,
@@ -38,7 +38,9 @@ def __init__(
3838
overwrite: Whether to overwrite an existing cache with the same name.
3939
entry_scope: Optional scope for cache entries.
4040
"""
41-
# Initialize the base class
41+
if connection_kwargs is None:
42+
connection_kwargs = {}
43+
4244
super().__init__(
4345
name=name,
4446
ttl=ttl,
@@ -47,7 +49,6 @@ def __init__(
4749
connection_kwargs=connection_kwargs,
4850
)
4951

50-
# Store configuration
5152
self._name = name
5253
self._redis_client = redis_client
5354
self._redis_url = redis_url

redisvl/extensions/llmcache/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
stacklevel=2,
2222
)
2323

24-
from redisvl.extensions.llmcache.langcache_api import LangCache
24+
from redisvl.extensions.cache.llm.langcache_api import LangCache
2525

2626
__all__ = [
2727
"BaseLLMCache",

0 commit comments

Comments
 (0)