chore: small changes

This commit is contained in:
Hk-Gosuto
2024-04-11 13:01:44 +08:00
parent 1087df6b37
commit d725b342a8
5 changed files with 55 additions and 52 deletions

View File

@@ -79,12 +79,3 @@ export async function getWbiKeys(): Promise<{
),
};
}
// async function main(): Promise<void> {
// const web_keys: { img_key: string, sub_key: string } = await getWbiKeys()
// const params: Record<string, string | number> = { foo: '114', bar: '514', baz: 1919810 }
// const img_key: string = web_keys.img_key
// const sub_key: string = web_keys.sub_key
// const query: string = encWbi(params, img_key, sub_key)
// console.log(query)
// }

View File

@@ -76,6 +76,7 @@ export class BilibiliVideoConclusionTool
);
const vidinfo = await vidinfo_resp.json();
console.log("[BilibiliVideoConclusionTool]", vidinfo);
const mid = vidinfo.data.owner.mid;
const cid = vidinfo.data.pages[pid - 1].cid;
@@ -99,6 +100,7 @@ export class BilibiliVideoConclusionTool
);
const data = await resp.json();
console.log("[BilibiliVideoConclusionTool]", data);
const model_result = data.data.model_result;
switch (model_result.result_type) {
case 0:

View File

@@ -68,7 +68,7 @@ export class BilibiliVideoSearchTool extends Tool implements RequestTool {
});
let rawData: { [key: string]: any } = await resp.json();
// console.log(rawData);
console.log("[BilibiliVideoSearchTool]", rawData);
let data: Array<{
title: string;
url: string;
@@ -99,7 +99,7 @@ export class BilibiliVideoSearchTool extends Tool implements RequestTool {
durationSeconds,
});
});
console.log("[BilibiliVideoSearchTool]", data);
return data;
}

View File

@@ -32,46 +32,6 @@ export const CN_PLUGINS: BuiltinPlugin[] = [
enable: true,
onlyNodeRuntime: false,
},
{
name: "Bilibili视频信息获取",
toolName: "bilibili_video_info",
lang: "cn",
description: "通过Bilibili视频ID获取视频信息如标题、简介等。",
builtin: true,
createdAt: 1712394126000,
enable: true,
onlyNodeRuntime: false,
},
{
name: "Bilibili视频搜索",
toolName: "bilibili_video_search",
lang: "cn",
description: "通过关键词搜索Bilibili视频并获取视频信息。",
builtin: true,
createdAt: 1712394126000,
enable: true,
onlyNodeRuntime: false,
},
{
name: "Bilibili听歌识曲",
toolName: "bilibili_music_recognition",
lang: "cn",
description: "通过Bilibili视频ID进行听歌识曲识别。",
builtin: true,
createdAt: 1712394126000,
enable: true,
onlyNodeRuntime: false,
},
{
name: "Bilibili视频总结",
toolName: "bilibili_video_conclusion",
lang: "cn",
description: "通过Bilibili视频ID进行视频总结。",
builtin: true,
createdAt: 1712394126000,
enable: true,
onlyNodeRuntime: false,
},
{
name: "维基百科",
toolName: "WikipediaQueryRun",
@@ -135,4 +95,46 @@ export const CN_PLUGINS: BuiltinPlugin[] = [
enable: false,
onlyNodeRuntime: false,
},
{
name: "bilibili视频信息获取",
toolName: "bilibili_video_info",
lang: "cn",
description: "通过bilibili视频ID获取视频信息如标题、简介等。",
builtin: true,
createdAt: 1712394126000,
enable: false,
onlyNodeRuntime: false,
},
{
name: "bilibili视频搜索",
toolName: "bilibili_video_search",
lang: "cn",
description: "通过关键词搜索bilibili视频并获取视频信息。",
builtin: true,
createdAt: 1712394126000,
enable: false,
onlyNodeRuntime: false,
},
{
name: "bilibili听歌识曲",
toolName: "bilibili_music_recognition",
lang: "cn",
description:
"通过bilibili视频ID进行听歌识曲识别。(建议同时启用`bilibili视频信息获取`插件保证功能完整)",
builtin: true,
createdAt: 1712394126000,
enable: false,
onlyNodeRuntime: false,
},
{
name: "bilibili视频总结",
toolName: "bilibili_video_conclusion",
lang: "cn",
description:
"通过bilibili视频ID进行视频总结。(建议同时启用`bilibili视频信息获取`插件保证功能完整)",
builtin: true,
createdAt: 1712394126000,
enable: false,
onlyNodeRuntime: false,
},
];