koishi-plugin-sy-bot 0.0.15 → 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/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) {
|