mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
fix the note_creation tool
This commit is contained in:
parent
6f98e724a8
commit
7c97493b5c
@ -44,7 +44,21 @@ export const noteCreationToolDefinition: Tool = {
|
||||
},
|
||||
attributes: {
|
||||
type: 'array',
|
||||
description: 'Array of attributes to set on the note (e.g., [{"name":"#tag"}, {"name":"priority", "value":"high"}])'
|
||||
description: 'Array of attributes to set on the note (e.g., [{"name":"#tag"}, {"name":"priority", "value":"high"}])',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string',
|
||||
description: 'Name of the attribute'
|
||||
},
|
||||
value: {
|
||||
type: 'string',
|
||||
description: 'Value of the attribute (optional)'
|
||||
}
|
||||
},
|
||||
required: ['name']
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['title', 'content']
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Tool Interfaces
|
||||
*
|
||||
*
|
||||
* This file defines the interfaces for the LLM tool calling system.
|
||||
*/
|
||||
|
||||
@ -27,6 +27,11 @@ export interface ToolParameter {
|
||||
type: string;
|
||||
description: string;
|
||||
enum?: string[];
|
||||
items?: ToolParameter | {
|
||||
type: string;
|
||||
properties?: Record<string, ToolParameter>;
|
||||
required?: string[];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@ -49,7 +54,7 @@ export interface ToolHandler {
|
||||
* Tool definition to be sent to the LLM
|
||||
*/
|
||||
definition: Tool;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the tool with the given arguments
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user