Skip to content

Commit 1871eec

Browse files
committed
fix manage redis
1 parent 10c8ae0 commit 1871eec

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modelcache/manager/vector_data/redis.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,21 @@ def __init__(
2222
username: str = "",
2323
password: str = "",
2424
# dimension: int = 0,
25-
mm_dimension: int = 0,
25+
dimension: int = 0,
2626
i_dimension: int = 0,
2727
t_dimension: int = 0,
2828
top_k: int = 1,
2929
namespace: str = "",
3030
):
31-
if mm_dimension <= 0:
31+
if dimension <= 0:
3232
raise ValueError(
33-
f"invalid `dim` param: {mm_dimension} in the Redis vector store."
33+
f"invalid `dim` param: {dimension} in the Redis vector store."
3434
)
3535
self._client = Redis(
3636
host=host, port=int(port), username=username, password=password
3737
)
3838
self.top_k = top_k
39-
# self.dimension = dimension
40-
self.mm_dimension = mm_dimension
39+
self.dimension = dimension
4140
self.i_dimension = i_dimension
4241
self.t_dimension = t_dimension
4342
self.namespace = namespace

0 commit comments

Comments
 (0)