🐛 fix(builtin-tool-memory): missing activities for topK parameter (#11801)

This commit is contained in:
Neko
2026-01-25 14:53:08 +08:00
committed by GitHub
parent 629a04b955
commit d6dee2ad6f
2 changed files with 5 additions and 1 deletions

View File

@@ -18,6 +18,7 @@
},
"devDependencies": {
"@lobechat/types": "workspace:*",
"@types/json-schema": "^7.0.15",
"promptfoo": "^0.120.17"
},
"peerDependencies": {

View File

@@ -8,6 +8,7 @@ import {
MERGE_STRATEGIES,
RELATIONSHIPS,
} from '@lobechat/types';
import { JSONSchema7 } from 'json-schema'
import { systemPrompt } from './systemRole';
import { MemoryApiName } from './types';
@@ -26,7 +27,9 @@ export const MemoryManifest: BuiltinToolManifest = {
query: { type: 'string' },
topK: {
additionalProperties: false,
description: "Limits on number of memories to return per layer, default to search 3 activities, 0 contexts, 0 experiences, and 0 preferences if not specified.",
properties: {
activities: { minimum: 0, type: 'integer' },
contexts: { minimum: 0, type: 'integer' },
experiences: { minimum: 0, type: 'integer' },
preferences: { minimum: 0, type: 'integer' },
@@ -37,7 +40,7 @@ export const MemoryManifest: BuiltinToolManifest = {
},
required: ['query', 'topK'],
type: 'object',
},
} satisfies JSONSchema7,
},
{
description: