koishi-plugin-chatluna-google-gemini-adapter 1.2.14 → 1.2.15
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.cjs +4 -8
- package/lib/index.mjs +4 -8
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -179,14 +179,10 @@ function extractSystemMessages(messages) {
|
|
|
179
179
|
return [
|
|
180
180
|
{
|
|
181
181
|
role: "user",
|
|
182
|
-
parts:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
return acc;
|
|
187
|
-
}, []).map((part) => partAsType(part).text).join("\n\n\n")
|
|
188
|
-
}
|
|
189
|
-
]
|
|
182
|
+
parts: systemMessages.reduce((acc, cur) => {
|
|
183
|
+
acc.push(...cur.parts);
|
|
184
|
+
return acc;
|
|
185
|
+
}, [])
|
|
190
186
|
},
|
|
191
187
|
modelMessages
|
|
192
188
|
];
|
package/lib/index.mjs
CHANGED
|
@@ -172,14 +172,10 @@ function extractSystemMessages(messages) {
|
|
|
172
172
|
return [
|
|
173
173
|
{
|
|
174
174
|
role: "user",
|
|
175
|
-
parts:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return acc;
|
|
180
|
-
}, []).map((part) => partAsType(part).text).join("\n\n\n")
|
|
181
|
-
}
|
|
182
|
-
]
|
|
175
|
+
parts: systemMessages.reduce((acc, cur) => {
|
|
176
|
+
acc.push(...cur.parts);
|
|
177
|
+
return acc;
|
|
178
|
+
}, [])
|
|
183
179
|
},
|
|
184
180
|
modelMessages
|
|
185
181
|
];
|
package/package.json
CHANGED