Fix OpenClaw Mem0 custom categories payload (#5345)
Co-authored-by: Kartik <kartik.labhshetwar@mem0.ai>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user