mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
feat: add github tool
This commit is contained in:
parent
84e7e6b859
commit
0ad0e2d237
3 changed files with 66 additions and 2 deletions
|
|
@ -54,6 +54,7 @@ import { QwenApi } from '../utils/alibaba/qwen-api.js'
|
|||
import { BingAIClient } from '../client/CopilotAIClient.js'
|
||||
import Keyv from 'keyv'
|
||||
import crypto from 'crypto'
|
||||
import {GithubAPITool} from '../utils/tools/GithubTool.js'
|
||||
|
||||
export const roleMap = {
|
||||
owner: 'group owner',
|
||||
|
|
@ -774,7 +775,8 @@ async function collectTools (e) {
|
|||
new SendMessageToSpecificGroupOrUserTool(),
|
||||
new SendDiceTool(),
|
||||
new QueryGenshinTool(),
|
||||
new SetTitleTool()
|
||||
new SetTitleTool(),
|
||||
new GithubAPITool()
|
||||
]
|
||||
// todo 3.0再重构tool的插拔和管理
|
||||
let /** @type{AbstractTool[]} **/ tools = [
|
||||
|
|
@ -796,7 +798,8 @@ async function collectTools (e) {
|
|||
new APTool(),
|
||||
// new HandleMessageMsgTool(),
|
||||
serpTool,
|
||||
new QueryUserinfoTool()
|
||||
new QueryUserinfoTool(),
|
||||
new GithubAPITool()
|
||||
]
|
||||
let systemAddition = ''
|
||||
if (e.isGroup) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue