langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Add **kwargs to RedisChatMessageHistory

Open LouisSilva opened this issue 1 year ago • 1 comments

Add **kwargs argument to class RedisChatMessageHistory. I have used this in my own project so I can pass a password along with the url to connect to Redis.

Also added add a ping function in the RedisChatMessageHistory class. I have used this in my own project so I can check if I have successfully authenticated, before doing anything.

LouisSilva avatar Apr 14 '23 19:04 LouisSilva

Slightly tangential / broader in scope than this issue, but what if we pass redis client in directly in init? as syntactic sugar we can add a from_url classmethod that constructs client for you (and that can take in kwargs).

Something like my recent commit? Also I was looking around and I noticed in vectorstores/redis.py in the Redis(VectorStore) class there is **kwargs passed into the redis.from_url in init, like my first commit.

LouisSilva avatar Apr 15 '23 10:04 LouisSilva