Skip to content

Commit

Permalink
fix: index response error compatible with stack and redis 8
Browse files Browse the repository at this point in the history
  • Loading branch information
wjohnsto authored and bsbodden committed Feb 13, 2025
1 parent 0f70587 commit cc69882
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/redis/langchain_redis/chat_message_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def _ensure_index(self) -> None:
try:
self.redis_client.ft(self.index_name).info()
except ResponseError as e:
if str(e).lower() == "unknown index name":
msg = str(e).lower()
if "unknown index name" in msg or "no such index" in msg:
schema = (
TagField("$.session_id", as_name="session_id"),
TextField("$.data.content", as_name="content"),
Expand Down

0 comments on commit cc69882

Please sign in to comment.