@ai-sdk/openai 3.0.0-beta.95 → 3.0.0-beta.97
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.js +17 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -13
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +16 -12
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +16 -12
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.97
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [960ec8f]
|
|
8
|
+
- @ai-sdk/provider-utils@4.0.0-beta.48
|
|
9
|
+
|
|
10
|
+
## 3.0.0-beta.96
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 817e601: fix(openai); fix url_citation schema in chat api
|
|
15
|
+
- 59561f8: fix(openai); fix url_citation schema in chat api
|
|
16
|
+
|
|
3
17
|
## 3.0.0-beta.95
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -346,10 +346,12 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazySchema)(
|
|
|
346
346
|
annotations: import_v42.z.array(
|
|
347
347
|
import_v42.z.object({
|
|
348
348
|
type: import_v42.z.literal("url_citation"),
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
349
|
+
url_citation: import_v42.z.object({
|
|
350
|
+
start_index: import_v42.z.number(),
|
|
351
|
+
end_index: import_v42.z.number(),
|
|
352
|
+
url: import_v42.z.string(),
|
|
353
|
+
title: import_v42.z.string()
|
|
354
|
+
})
|
|
353
355
|
})
|
|
354
356
|
).nullish()
|
|
355
357
|
}),
|
|
@@ -413,10 +415,12 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazySchema)(
|
|
|
413
415
|
annotations: import_v42.z.array(
|
|
414
416
|
import_v42.z.object({
|
|
415
417
|
type: import_v42.z.literal("url_citation"),
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
url_citation: import_v42.z.object({
|
|
419
|
+
start_index: import_v42.z.number(),
|
|
420
|
+
end_index: import_v42.z.number(),
|
|
421
|
+
url: import_v42.z.string(),
|
|
422
|
+
title: import_v42.z.string()
|
|
423
|
+
})
|
|
420
424
|
})
|
|
421
425
|
).nullish()
|
|
422
426
|
}).nullish(),
|
|
@@ -852,8 +856,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
852
856
|
type: "source",
|
|
853
857
|
sourceType: "url",
|
|
854
858
|
id: (0, import_provider_utils5.generateId)(),
|
|
855
|
-
url: annotation.url,
|
|
856
|
-
title: annotation.title
|
|
859
|
+
url: annotation.url_citation.url,
|
|
860
|
+
title: annotation.url_citation.title
|
|
857
861
|
});
|
|
858
862
|
}
|
|
859
863
|
const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
|
|
@@ -1068,8 +1072,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
1068
1072
|
type: "source",
|
|
1069
1073
|
sourceType: "url",
|
|
1070
1074
|
id: (0, import_provider_utils5.generateId)(),
|
|
1071
|
-
url: annotation.url,
|
|
1072
|
-
title: annotation.title
|
|
1075
|
+
url: annotation.url_citation.url,
|
|
1076
|
+
title: annotation.url_citation.title
|
|
1073
1077
|
});
|
|
1074
1078
|
}
|
|
1075
1079
|
}
|
|
@@ -5489,7 +5493,7 @@ var OpenAITranscriptionModel = class {
|
|
|
5489
5493
|
};
|
|
5490
5494
|
|
|
5491
5495
|
// src/version.ts
|
|
5492
|
-
var VERSION = true ? "3.0.0-beta.
|
|
5496
|
+
var VERSION = true ? "3.0.0-beta.97" : "0.0.0-test";
|
|
5493
5497
|
|
|
5494
5498
|
// src/openai-provider.ts
|
|
5495
5499
|
function createOpenAI(options = {}) {
|