Compare commits

..
8 changed files with 20 additions and 9 deletions
@@ -216,7 +216,7 @@ memory.delete_all(user_id="alice")
## Put it into practice
- Review the <Link href="/api-reference/memory/delete-memory">Delete Memory API reference</Link>, plus <Link href="/api-reference/memory/batch-delete">Batch Delete</Link> and <Link href="/api-reference/memory/delete-memories">Filtered Delete</Link>.
- Use metadata-based expiration patterns to automate retention (see the <Link href="/cookbooks/essentials/building-ai-companion">AI Companion cookbook</Link> for an example).
- Pair deletes with <Link href="/platform/features/expiration-date">Expiration Policies</Link> to automate retention.
## See it live
@@ -233,9 +233,9 @@ memory.delete_all(user_id="alice")
href="/core-concepts/memory-operations/add"
/>
<Card
title="Search & Retrieve Concepts"
description="Learn how to find and rank the memories you keep."
icon="magnifying-glass"
href="/core-concepts/memory-operations/search"
title="Enable Expiration Policies"
description="Automate retention with the platform’s expiration feature."
icon="clock"
href="/platform/features/expiration-date"
/>
</CardGroup>
+1 -1
View File
@@ -18,7 +18,7 @@ module.exports = {
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
},
setupFiles: ["dotenv/config"],
setupFiles: ["dotenv/config", "<rootDir>/jest.setup.ts"],
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
globals: {
+3
View File
@@ -0,0 +1,3 @@
import pkg from "./package.json";
(globalThis as any).__MEM0_SDK_VERSION__ = pkg.version;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mem0ai",
"version": "3.0.0",
"version": "3.0.1",
"description": "The Memory Layer For Your AI Apps",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
+1 -1
View File
@@ -1,7 +1,7 @@
// @ts-nocheck
import type { TelemetryClient, TelemetryOptions } from "./telemetry.types";
let version = "2.1.36";
let version = __MEM0_SDK_VERSION__;
// Safely check for process.env in different environments
let MEM0_TELEMETRY = true;
+1
View File
@@ -0,0 +1 @@
declare const __MEM0_SDK_VERSION__: string;
+1 -1
View File
@@ -4,7 +4,7 @@ import type {
TelemetryEventData,
} from "./telemetry.types";
let version = "2.1.34";
let version = __MEM0_SDK_VERSION__;
// Safely check for process.env in different environments
let MEM0_TELEMETRY = true;
+7
View File
@@ -1,4 +1,5 @@
import { defineConfig } from "tsup";
import pkg from "./package.json";
const external = [
"openai",
@@ -23,6 +24,10 @@ const external = [
"natural",
];
const define = {
__MEM0_SDK_VERSION__: JSON.stringify(pkg.version),
};
export default defineConfig([
{
entry: ["src/client/index.ts"],
@@ -30,6 +35,7 @@ export default defineConfig([
dts: true,
sourcemap: true,
external,
define,
},
{
entry: ["src/oss/src/index.ts"],
@@ -38,5 +44,6 @@ export default defineConfig([
dts: true,
sourcemap: true,
external,
define,
},
]);