Improved memory management
All checks were successful
Publish Library / Build NPM Project (push) Successful in 44s
Publish Library / Tag Version (push) Successful in 11s

This commit is contained in:
2026-07-27 14:25:24 -04:00
parent a6fb8ae828
commit 8229e02a52
3 changed files with 113 additions and 37 deletions

View File

@@ -100,16 +100,11 @@ export const CliTool: AiTool = {
export const DateTimeTool: AiTool = {
name: 'get_datetime',
description: 'Get local date / time',
args: {},
fn: async () => new Date().toString()
}
export const DateTimeUTCTool: AiTool = {
name: 'get_datetime_utc',
description: 'Get current UTC date / time',
args: {},
fn: async () => new Date().toUTCString()
description: 'Get local/UTC date/time',
args: {
timezone: {type: 'string', description: 'Which timezone to return, defaults to local', enum: ['local', 'utc'], default: 'local'}
},
fn: ({timezone}) => new Date()[timezone === 'local' ? 'toString' : 'toUTCString']()
}
export const ExecTool: AiTool = {
@@ -168,7 +163,7 @@ export const JSTool: AiTool = {
}
export const PythonTool: AiTool = {
name: 'exec_javascript',
name: 'exec_python',
description: 'Execute commonjs javascript',
args: {
code: {type: 'string', description: 'CommonJS javascript', required: true}