-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
🐛 Describe the bug
Hi,
there is an issue with using mem0 and redis cloud. The search module is differently named, and the following check fails:
| if (!hasSearch) { |
If I run this code:
const client = createClient({
url: process.env.REDIS_URL,
});
await client.connect();
const modulesResponse = (await client.moduleList()) as unknown as any[];
console.log("modulesResponse", modulesResponse);
await client.disconnect();
// Now create the Memory instance
return new Memory({
vectorStore: {
provider: "redis",
config: {
collectionName: "memories",
embeddingModelDims: 1536,
redisUrl: process.env.REDIS_URL,
},
},
});I get the following exception:
Redis Client Connected
Connected to Redis
Error initializing Redis: RediSearch module is not loaded. Please ensure Redis Stack is properly installed and running.
Failed to initialize Redis: [Error: RediSearch module is not loaded. Please ensure Redis Stack is properly installed and running.]
[Error: RediSearch module is not loaded. Please ensure Redis Stack is properly installed and running.]
⨯ unhandledRejection: [Error: RediSearch module is not loaded. Please ensure Redis Stack is properly installed and running.]
⨯ unhandledRejection: [Error: RediSearch module is not loaded. Please ensure Redis Stack is properly installed and running.]
However I have a redis instance running on RedisCloud that should be fully compatible, see here:
The issue can be fixed by changing the filtering logic (I'll make a PR), this is my module response from the above code:
modulesResponse [
{ name: 'ReJSON', ver: 20810 },
{ name: 'bf', ver: 20807 },
{ name: 'searchlight', ver: 21017 },
{ name: 'timeseries', ver: 11207 }
]
Redis Client Connected
Connected to Redis
Error initializing Redis: RediSearch module is not loaded. Please ensure Redis Stack is properly installed and r
// ...
langchain also had a similar issue raised, see here: langchain-ai/langchain#2113 (comment), they also extended their search to include searchlight module from Redis.
Metadata
Metadata
Assignees
Labels
No labels