Fix OpenClaw Mem0 custom categories payload (#5345)

Co-authored-by: Kartik <kartik.labhshetwar@mem0.ai>
This commit is contained in:
mjzcng
2026-06-12 19:48:53 +05:30
committed by GitHub
co-authored by Kartik
parent f48b133101
commit 821152bd14
4 changed files with 94 additions and 4 deletions
+7 -2
View File
@@ -25,7 +25,11 @@ import type {
AddOptions,
SearchOptions,
} from "./types.ts";
import { createProvider, providerToBackend } from "./providers.ts";
import {
createProvider,
customCategoryMapToList,
providerToBackend,
} from "./providers.ts";
import { mem0ConfigSchema } from "./config.ts";
import type { FileConfig } from "./config.ts";
import { createPublicArtifactsProvider } from "./public-artifacts.ts";
@@ -289,7 +293,8 @@ const memoryPlugin = definePluginEntry({
if (runId) opts.run_id = runId;
// Pass customInstructions and customCategories to control what Mem0 extracts
if (cfg.customInstructions) opts.custom_instructions = cfg.customInstructions;
if (cfg.customCategories) opts.custom_categories = cfg.customCategories;
const customCategories = customCategoryMapToList(cfg.customCategories);
if (customCategories) opts.custom_categories = customCategories;
return opts;
}