diff options
Diffstat (limited to 'packages/core/src/tools/memoryTool.ts')
| -rw-r--r-- | packages/core/src/tools/memoryTool.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/core/src/tools/memoryTool.ts b/packages/core/src/tools/memoryTool.ts index 2c6f41c8..b4a671b0 100644 --- a/packages/core/src/tools/memoryTool.ts +++ b/packages/core/src/tools/memoryTool.ts @@ -5,19 +5,20 @@ */ import { BaseTool, ToolResult } from './tools.js'; +import { FunctionDeclaration, Type } from '@google/genai'; import * as fs from 'fs/promises'; import * as path from 'path'; import { homedir } from 'os'; -const memoryToolSchemaData = { +const memoryToolSchemaData: FunctionDeclaration = { name: 'save_memory', description: 'Saves a specific piece of information or fact to your long-term memory. Use this when the user explicitly asks you to remember something, or when they state a clear, concise fact that seems important to retain for future interactions.', parameters: { - type: 'object', + type: Type.OBJECT, properties: { fact: { - type: 'string', + type: Type.STRING, description: 'The specific fact or piece of information to remember. Should be a clear, self-contained statement.', }, @@ -98,7 +99,7 @@ function ensureNewlineSeparation(currentContent: string): string { } export class MemoryTool extends BaseTool<SaveMemoryParams, ToolResult> { - static readonly Name: string = memoryToolSchemaData.name; + static readonly Name: string = memoryToolSchemaData.name!; constructor() { super( MemoryTool.Name, |
