Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@
"cookie@<0.7.0": ">=0.7.0",
"@eslint/plugin-kit@<0.3.4": ">=0.3.4",
"tmp@<=0.2.3": ">=0.2.4",
"axios@<1.8.2": ">=1.8.2"
"axios@<1.8.2": ">=1.8.2",
"glob@>=10.3.7 <=11.0.3": ">=11.1.0"
}
},
"os": [
Expand Down
70 changes: 46 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 15 additions & 40 deletions scripts/examples/real-memory-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,34 +39,10 @@ async function realMemoryTest() {
console.log("🧠 Complete Memory Test - End-to-End Testing");
console.log("=============================================\n");

// Mem0 Cloud API configuration
const mem0Config = {
disableHistory: true,
version: "v1.1",
embedder: {
provider: "openai",
config: {
apiKey: process.env.OPENAI_API_KEY || "",
model: "text-embedding-3-small",
},
},
vectorStore: {
provider: "qdrant",
config: {
collectionName: "brownmunde",
dimension: 1536,
url: "http://localhost:6333",
checkCompatibility: false,
},
},
llm: {
provider: "google",
config: {
baseURL: "https://generativelanguage.googleapis.com",
apiKey: process.env.GEMINI_API_KEY || "",
model: "gemini-2.0-flash-exp"
},
}
};
apiKey: process.env.MEM0_API_KEY || "",
};

const conversationMemory = {
enabled: true,
Expand Down Expand Up @@ -105,7 +81,7 @@ async function realMemoryTest() {
provider: "vertex", // Use available provider
context: {
sessionId: "newusersessionidNo",
userId: "deepak_123"
userId: "Test_user_alice"
},
model: "claude-sonnet-4@20250514",
enableAnalytics: true
Expand Down Expand Up @@ -150,7 +126,7 @@ async function realMemoryTest() {
},
context: {
sessionId: "oldUserNewSessionId",
userId: "deepak_123"
userId: "Test_user_alice"
},
provider: "vertex",
model: "gemini-2.5-flash",
Expand Down Expand Up @@ -210,7 +186,7 @@ async function realMemoryTest() {
},
context: {
sessionId: "bobFirstSession",
userId: "bob_456" // Different user ID
userId: "Test_user_bob" // Different user ID
},
provider: "vertex",
model: "claude-sonnet-4@20250514",
Expand Down Expand Up @@ -254,7 +230,7 @@ async function realMemoryTest() {
},
context: {
sessionId: "bobSecondSession", // Different session for Bob
userId: "bob_456" // Same user ID as Bob
userId: "Test_user_bob" // Same user ID as Bob
},
provider: "vertex",
model: "claude-sonnet-4@20250514",
Expand Down Expand Up @@ -294,7 +270,7 @@ async function realMemoryTest() {
},
context: {
sessionId: "aliceNewFrameworkSession", // New session for Alice
userId: "deepak_123" // Same user ID as Alice
userId: "Test_user_alice" // Same user ID as Alice
},
provider: "vertex",
model: "claude-sonnet-4@20250514",
Expand Down Expand Up @@ -338,7 +314,7 @@ async function realMemoryTest() {
},
context: {
sessionId: "aliceStreamingSession",
userId: "deepak_123" // Same Alice user
userId: "Test_user_alice" // Same Alice user
},
provider: "vertex",
model: "gemini-2.5-flash",
Expand Down Expand Up @@ -402,7 +378,7 @@ async function realMemoryTest() {
},
context: {
sessionId: "bobStreamingSession",
userId: "bob_456" // Bob's user ID
userId: "Test_user_bob" // Bob's user ID
},
provider: "vertex",
model: "gemini-2.5-flash",
Expand Down Expand Up @@ -533,15 +509,14 @@ async function realMemoryTest() {

console.log("\nπŸ”§ Debugging Steps:");
console.log("==================");
console.log("1. Check if Qdrant is running:");
console.log(" docker run -p 6333:6333 qdrant/qdrant");
console.log(" curl http://localhost:6333/health");
console.log("1. Verify Mem0 Cloud API key:");
console.log(" echo $MEM0_API_KEY");
console.log("");
console.log("2. Verify Google AI API key:");
console.log(" echo $GOOGLE_AI_API_KEY");
console.log("2. Verify Gemini API key:");
console.log(" echo $GEMINI_API_KEY");
console.log("");
console.log("3. Check environment variables:");
console.log(" env | grep -E '(GOOGLE|VERTEX|AI)'");
console.log(" env | grep -E '(GEMINI|VERTEX|AI|MEM0)'");
console.log("");
console.log("4. Run with debug output:");
console.log(" DEBUG=* node scripts/examples/real-memory-test.js");
Expand Down
Loading
Loading