@ai-sdk/openai 4.0.0-beta.5 → 4.0.0-beta.7
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 +14 -0
- package/dist/index.d.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +26 -26
- package/dist/internal/index.d.ts +26 -26
- package/dist/internal/index.js +10 -10
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +7 -7
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/chat/convert-openai-chat-usage.ts +2 -2
- package/src/chat/convert-to-openai-chat-messages.ts +5 -5
- package/src/chat/map-openai-finish-reason.ts +2 -2
- package/src/chat/openai-chat-language-model.ts +22 -22
- package/src/chat/openai-chat-prepare-tools.ts +6 -6
- package/src/completion/convert-openai-completion-usage.ts +2 -2
- package/src/completion/convert-to-openai-completion-prompt.ts +2 -2
- package/src/completion/map-openai-finish-reason.ts +2 -2
- package/src/completion/openai-completion-language-model.ts +20 -20
- package/src/embedding/openai-embedding-model.ts +5 -5
- package/src/image/openai-image-model.ts +9 -9
- package/src/openai-provider.ts +21 -21
- package/src/responses/convert-openai-responses-usage.ts +2 -2
- package/src/responses/convert-to-openai-responses-input.ts +7 -7
- package/src/responses/map-openai-responses-finish-reason.ts +2 -2
- package/src/responses/openai-responses-language-model.ts +29 -29
- package/src/responses/openai-responses-prepare-tools.ts +6 -6
- package/src/speech/openai-speech-model.ts +7 -7
- package/src/transcription/openai-transcription-model.ts +8 -8
package/dist/index.mjs
CHANGED
|
@@ -639,7 +639,7 @@ function prepareChatTools({
|
|
|
639
639
|
// src/chat/openai-chat-language-model.ts
|
|
640
640
|
var OpenAIChatLanguageModel = class {
|
|
641
641
|
constructor(modelId, config) {
|
|
642
|
-
this.specificationVersion = "
|
|
642
|
+
this.specificationVersion = "v4";
|
|
643
643
|
this.supportedUrls = {
|
|
644
644
|
"image/*": [/^https?:\/\/.*$/]
|
|
645
645
|
};
|
|
@@ -1383,7 +1383,7 @@ var openaiLanguageModelCompletionOptions = lazySchema4(
|
|
|
1383
1383
|
// src/completion/openai-completion-language-model.ts
|
|
1384
1384
|
var OpenAICompletionLanguageModel = class {
|
|
1385
1385
|
constructor(modelId, config) {
|
|
1386
|
-
this.specificationVersion = "
|
|
1386
|
+
this.specificationVersion = "v4";
|
|
1387
1387
|
this.supportedUrls = {
|
|
1388
1388
|
// No URLs are supported for completion models.
|
|
1389
1389
|
};
|
|
@@ -1655,7 +1655,7 @@ var openaiTextEmbeddingResponseSchema = lazySchema6(
|
|
|
1655
1655
|
// src/embedding/openai-embedding-model.ts
|
|
1656
1656
|
var OpenAIEmbeddingModel = class {
|
|
1657
1657
|
constructor(modelId, config) {
|
|
1658
|
-
this.specificationVersion = "
|
|
1658
|
+
this.specificationVersion = "v4";
|
|
1659
1659
|
this.maxEmbeddingsPerCall = 2048;
|
|
1660
1660
|
this.supportsParallelCalls = true;
|
|
1661
1661
|
this.modelId = modelId;
|
|
@@ -1784,7 +1784,7 @@ var OpenAIImageModel = class {
|
|
|
1784
1784
|
constructor(modelId, config) {
|
|
1785
1785
|
this.modelId = modelId;
|
|
1786
1786
|
this.config = config;
|
|
1787
|
-
this.specificationVersion = "
|
|
1787
|
+
this.specificationVersion = "v4";
|
|
1788
1788
|
}
|
|
1789
1789
|
get maxImagesPerCall() {
|
|
1790
1790
|
var _a;
|
|
@@ -4487,7 +4487,7 @@ function extractApprovalRequestIdToToolCallIdMapping(prompt) {
|
|
|
4487
4487
|
}
|
|
4488
4488
|
var OpenAIResponsesLanguageModel = class {
|
|
4489
4489
|
constructor(modelId, config) {
|
|
4490
|
-
this.specificationVersion = "
|
|
4490
|
+
this.specificationVersion = "v4";
|
|
4491
4491
|
this.supportedUrls = {
|
|
4492
4492
|
"image/*": [/^https?:\/\/.*$/],
|
|
4493
4493
|
"application/pdf": [/^https?:\/\/.*$/]
|
|
@@ -6061,7 +6061,7 @@ var OpenAISpeechModel = class {
|
|
|
6061
6061
|
constructor(modelId, config) {
|
|
6062
6062
|
this.modelId = modelId;
|
|
6063
6063
|
this.config = config;
|
|
6064
|
-
this.specificationVersion = "
|
|
6064
|
+
this.specificationVersion = "v4";
|
|
6065
6065
|
}
|
|
6066
6066
|
get provider() {
|
|
6067
6067
|
return this.config.provider;
|
|
@@ -6297,7 +6297,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6297
6297
|
constructor(modelId, config) {
|
|
6298
6298
|
this.modelId = modelId;
|
|
6299
6299
|
this.config = config;
|
|
6300
|
-
this.specificationVersion = "
|
|
6300
|
+
this.specificationVersion = "v4";
|
|
6301
6301
|
}
|
|
6302
6302
|
get provider() {
|
|
6303
6303
|
return this.config.provider;
|
|
@@ -6401,7 +6401,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6401
6401
|
};
|
|
6402
6402
|
|
|
6403
6403
|
// src/version.ts
|
|
6404
|
-
var VERSION = true ? "4.0.0-beta.
|
|
6404
|
+
var VERSION = true ? "4.0.0-beta.7" : "0.0.0-test";
|
|
6405
6405
|
|
|
6406
6406
|
// src/openai-provider.ts
|
|
6407
6407
|
function createOpenAI(options = {}) {
|
|
@@ -6482,7 +6482,7 @@ function createOpenAI(options = {}) {
|
|
|
6482
6482
|
const provider = function(modelId) {
|
|
6483
6483
|
return createLanguageModel(modelId);
|
|
6484
6484
|
};
|
|
6485
|
-
provider.specificationVersion = "
|
|
6485
|
+
provider.specificationVersion = "v4";
|
|
6486
6486
|
provider.languageModel = createLanguageModel;
|
|
6487
6487
|
provider.chat = createChatModel;
|
|
6488
6488
|
provider.completion = createCompletionModel;
|