@ -56,8 +56,9 @@ def _check_redis_module_exist(client: RedisType, required_modules: List[dict]) -
return
return
# otherwise raise error
# otherwise raise error
error_message = (
error_message = (
" You must add the RediSearch (>= 2.4) module from Redis Stack. "
" Redis cannot be used as a vector database without RediSearch >=2.4 "
" Please refer to Redis Stack docs: https://redis.io/docs/stack/ "
" Please head to https://redis.io/docs/stack/search/quick_start/ "
" to know more about installing the RediSearch module within Redis Stack. "
)
)
logging . error ( error_message )
logging . error ( error_message )
raise ValueError ( error_message )
raise ValueError ( error_message )
@ -126,7 +127,7 @@ class Redis(VectorStore):
except ImportError :
except ImportError :
raise ValueError (
raise ValueError (
" Could not import redis python package. "
" Could not import redis python package. "
" Please install it with `pip install redis `."
" Please install it with `pip install redis >=4.1.0 `."
)
)
self . embedding_function = embedding_function
self . embedding_function = embedding_function
@ -358,7 +359,7 @@ class Redis(VectorStore):
@classmethod
@classmethod
def from_texts_return_keys (
def from_texts_return_keys (
cls : Type [ Redis ] ,
cls ,
texts : List [ str ] ,
texts : List [ str ] ,
embedding : Embeddings ,
embedding : Embeddings ,
metadatas : Optional [ List [ dict ] ] = None ,
metadatas : Optional [ List [ dict ] ] = None ,