copilot-api-plus 1.0.25 → 1.0.26
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/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1314,7 +1314,7 @@ function convertMessages$1(messages) {
|
|
|
1314
1314
|
function buildSystemInstruction(content) {
|
|
1315
1315
|
return {
|
|
1316
1316
|
role: "user",
|
|
1317
|
-
parts: { text: typeof content === "string" ? content : content.map((c) => c.text || "").join("") }
|
|
1317
|
+
parts: [{ text: typeof content === "string" ? content : content.map((c) => c.text || "").join("") }]
|
|
1318
1318
|
};
|
|
1319
1319
|
}
|
|
1320
1320
|
/**
|
|
@@ -1860,7 +1860,7 @@ function convertMessages(messages, system) {
|
|
|
1860
1860
|
let systemInstruction;
|
|
1861
1861
|
if (system) systemInstruction = {
|
|
1862
1862
|
role: "user",
|
|
1863
|
-
parts: { text: system }
|
|
1863
|
+
parts: [{ text: system }]
|
|
1864
1864
|
};
|
|
1865
1865
|
for (const message of messages) {
|
|
1866
1866
|
const role = message.role === "assistant" ? "model" : "user";
|