koishi-plugin-sy-bot 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -277,7 +277,7 @@ async function getAiChatResult({ config, user_query, ctx }) {
277
277
  "过滤后的parts回复列表:\n",
278
278
  data.candidates[0].content.parts.filter((part) => part.text)
279
279
  );
280
- const result = content.parts.filter((part) => part.text).map((part) => part.text).join("");
280
+ const result = content.parts.filter((part) => part.text && !part.thought).map((part) => part.text).join("");
281
281
  logger.info("AI回复的文字:", result);
282
282
  return result;
283
283
  } catch (error) {
@@ -335,7 +335,7 @@ async function getAiImgUnderstandMultiple({
335
335
  "过滤后的parts回复列表:\n",
336
336
  data.candidates[0].content.parts.filter((part) => part.text)
337
337
  );
338
- const text = data.candidates[0].content.parts.filter((part) => part.text).map((p) => p.text).join("");
338
+ const text = data.candidates[0].content.parts.filter((part) => part.text && !part.thought).map((p) => p.text).join("");
339
339
  logger.info("解析出的text:", text);
340
340
  return text;
341
341
  } catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-sy-bot",
3
3
  "description": "考研群答疑Bot,接入Gemini。",
4
- "version": "0.0.14",
4
+ "version": "0.0.16",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -15,6 +15,11 @@ Gemini API取自:[https://api.qingyuntop.top/](https://api.qingyuntop.top/)
15
15
 
16
16
  在群聊中调用`ask`命令来询问群机器人,bot会调用gemini进行回答,将回答结果的markdown文本渲染作为图片返回。
17
17
 
18
+ ![ask命令](https://ccccooh.oss-cn-hangzhou.aliyuncs.com/img/202601200205658.png)
19
+ ![ask命令](https://ccccooh.oss-cn-hangzhou.aliyuncs.com/img/202601200205162.png)
20
+ ![输出结果](https://ccccooh.oss-cn-hangzhou.aliyuncs.com/img/202601200205777.png)
21
+
22
+
18
23
  使用提示:
19
24
  - 可以引用消息块后`ask`
20
25
  - 引用块和输入块中的信息最终会被处理为一个整体作为机器人的输入
@@ -28,3 +33,6 @@ Gemini API取自:[https://api.qingyuntop.top/](https://api.qingyuntop.top/)
28
33
  - 通过`tip [数字]`来访问对应的考研经验贴
29
34
  - 数字为可选参数,如果留空则会输出资源列表
30
35
  - 通过命令`countdown`可以显示当前距离27考研的精确倒计时
36
+
37
+ ![效果](https://ccccooh.oss-cn-hangzhou.aliyuncs.com/img/202601200203169.png)
38
+ ![效果](https://ccccooh.oss-cn-hangzhou.aliyuncs.com/img/202601200204327.png)