@alpic80/rivet-ai-sdk-provider 2.0.7 → 2.0.9
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/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -790,6 +790,13 @@ function convertToRivetChatMessages(prompt) {
|
|
|
790
790
|
functionality: "Invalid images mediaType"
|
|
791
791
|
});
|
|
792
792
|
}
|
|
793
|
+
} else if (part.mediaType === "application/pdf") {
|
|
794
|
+
return {
|
|
795
|
+
type: "file",
|
|
796
|
+
filename: part.filename || "file.pdf",
|
|
797
|
+
mediaType: "application/pdf",
|
|
798
|
+
data: part.data.toString()
|
|
799
|
+
};
|
|
793
800
|
} else {
|
|
794
801
|
throw new UnsupportedFunctionalityError({
|
|
795
802
|
functionality: "Only images and PDF file parts are supported"
|
|
@@ -1102,7 +1109,7 @@ prepare tools input:${printObject(tools)}`);
|
|
|
1102
1109
|
}
|
|
1103
1110
|
|
|
1104
1111
|
// src/version.ts
|
|
1105
|
-
var VERSION = true ? "2.0.
|
|
1112
|
+
var VERSION = true ? "2.0.9" : "0.0.0-test";
|
|
1106
1113
|
|
|
1107
1114
|
// src/post-to-api.ts
|
|
1108
1115
|
var getOriginalFetch = () => globalThis.fetch;
|
|
@@ -1395,6 +1402,7 @@ var RivetChatLanguageModel = class {
|
|
|
1395
1402
|
abortSignal: options.abortSignal,
|
|
1396
1403
|
fetch: this.config.fetch
|
|
1397
1404
|
});
|
|
1405
|
+
debugLog(`generate response:${printObject(response)}`);
|
|
1398
1406
|
const choice = response.choices[0];
|
|
1399
1407
|
if (!choice) {
|
|
1400
1408
|
throw new Error("No choices found");
|
|
@@ -1429,6 +1437,7 @@ var RivetChatLanguageModel = class {
|
|
|
1429
1437
|
});
|
|
1430
1438
|
}
|
|
1431
1439
|
}
|
|
1440
|
+
debugLog(`generate content:${printObject(content)}`);
|
|
1432
1441
|
return {
|
|
1433
1442
|
content,
|
|
1434
1443
|
finishReason: mapRivetFinishReason(choice.finish_reason),
|