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 +2 -2
- package/package.json +1 -1
- package/readme.md +8 -0
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
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
|
+

|
|
19
|
+

|
|
20
|
+

|
|
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
|
+

|
|
38
|
+

|