@ai-sdk/openai 2.0.126 → 2.0.127
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/CHANGELOG.md +10 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +6 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -942,6 +942,12 @@ var OpenAIChatLanguageModel = class {
|
|
|
942
942
|
fetch: this.config.fetch
|
|
943
943
|
});
|
|
944
944
|
const choice = response.choices[0];
|
|
945
|
+
if (choice == null) {
|
|
946
|
+
throw new InvalidResponseDataError({
|
|
947
|
+
data: rawResponse,
|
|
948
|
+
message: "Response did not contain any choices."
|
|
949
|
+
});
|
|
950
|
+
}
|
|
945
951
|
const content = [];
|
|
946
952
|
const text = choice.message.content;
|
|
947
953
|
if (text != null && text.length > 0) {
|
|
@@ -5227,7 +5233,7 @@ var OpenAITranscriptionModel = class {
|
|
|
5227
5233
|
};
|
|
5228
5234
|
|
|
5229
5235
|
// src/version.ts
|
|
5230
|
-
var VERSION = true ? "2.0.
|
|
5236
|
+
var VERSION = true ? "2.0.127" : "0.0.0-test";
|
|
5231
5237
|
|
|
5232
5238
|
// src/openai-provider.ts
|
|
5233
5239
|
function createOpenAI(options = {}) {
|