mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
feat: 初步支持function call(WIP)
This commit is contained in:
parent
4a4dceec18
commit
97b3acbf3b
24 changed files with 13607 additions and 841 deletions
20
utils/tools/AbstractTool.js
Normal file
20
utils/tools/AbstractTool.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
export class AbstractTool {
|
||||
name = ''
|
||||
|
||||
parameters = {}
|
||||
|
||||
description = ''
|
||||
|
||||
func = async function () {}
|
||||
|
||||
function () {
|
||||
if (!this.parameters.type) {
|
||||
this.parameters.type = 'object'
|
||||
}
|
||||
return {
|
||||
name: this.name,
|
||||
description: this.description,
|
||||
parameters: this.parameters
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue