langchain
langchain copied to clipboard
Add **kwargs to RedisChatMessageHistory
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.
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.