redis/redis-vl-python

ResponseError: unknown command `MODULE`, with args beginning with: `LIST`,

Closed this issue · 3 comments

We are working with Azure Cache for Redis and getting below error when initializing Semantic cache with redisvl module.

r = Redis(host=REDIS_ENDPOINT, port=6380, password=REDIS_PASSWORD, ssl=True)

result = r.ping()
print("Ping returned : " + str(result)) -> True

Code:

import redis
from redisvl.extensions.llmcache import SemanticCache

redis_client = redis.Redis(host='host_name', port=6380,
                      password='api_key', ssl=True)

llmcache = SemanticCache(
    name="test-llmcache", 
    redis_client=redis_client,
    distance_threshold=0.1, 
    ttl=360,            
)

Error Logs

ResponseError: unknown command MODULE, with args beginning with: LIST,

Versions:

redis                    5.0.8
redisvl                  0.3.2

@justin-cechmanek @tylerhutcherson

RedisVL SemanticCache relies on the RediSearch module, which is not automatically enabled in Azure:
See here for Azure docs

@MSFTeegarden FYI can you point them in the right direction to support the modules in ACRE?

Yep! Hi @NISHANTSHRIVASTAV, like Justin said, you'll need to use the RediSearch module, which is only available on the Enterprise tier of Azure Cache for Redis. The other thing you'll need to do when using Azure Cache for Redis Enterprise is use port 10000 rather than 6379. That can trip people up.

Here's some examples we have in our docs that use langchain (which I believe uses RedisVL on the backend). You can, of course, also use RedisVL directly.

Semantic caching example
Vector similarity search example

Thanks a lot @MSFTeegarden @justin-cechmanek It worked