mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 16:32:33 +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: {
|
attributes: {
|
||||||
type: 'array',
|
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']
|
required: ['title', 'content']
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Tool Interfaces
|
* Tool Interfaces
|
||||||
*
|
*
|
||||||
* This file defines the interfaces for the LLM tool calling system.
|
* This file defines the interfaces for the LLM tool calling system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -27,6 +27,11 @@ export interface ToolParameter {
|
|||||||
type: string;
|
type: string;
|
||||||
description: string;
|
description: string;
|
||||||
enum?: 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
|
* Tool definition to be sent to the LLM
|
||||||
*/
|
*/
|
||||||
definition: Tool;
|
definition: Tool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the tool with the given arguments
|
* Execute the tool with the given arguments
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user