From 6c0cc56a9480fa68fc97f783f579cbf2d8b0a146 Mon Sep 17 00:00:00 2001 From: meta-d Date: Fri, 20 Dec 2024 17:47:51 +0800 Subject: [PATCH] fix: null memory store --- packages/server-ai/src/xpert/commands/handlers/chat.handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server-ai/src/xpert/commands/handlers/chat.handler.ts b/packages/server-ai/src/xpert/commands/handlers/chat.handler.ts index b82c7c95..e478c777 100644 --- a/packages/server-ai/src/xpert/commands/handlers/chat.handler.ts +++ b/packages/server-ai/src/xpert/commands/handlers/chat.handler.ts @@ -271,7 +271,7 @@ export class XpertChatHandler implements ICommandHandler { } async getLongTermMemory(store: BaseStore, xpertId: string, input: string) { - return await store.search([xpertId, LongTermMemoryTypeEnum.PROFILE], { query: input }) + return await store?.search([xpertId, LongTermMemoryTypeEnum.PROFILE], { query: input }) } }