@ai-sdk/openai 2.0.0-canary.16 → 2.0.0-canary.17
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 +8 -0
- package/dist/index.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +9 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -13
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +0 -2
- package/dist/internal/index.d.ts +0 -2
- package/dist/internal/index.js +6 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/internal/index.mjs
CHANGED
|
@@ -601,8 +601,9 @@ var OpenAIChatLanguageModel = class {
|
|
|
601
601
|
const body = {
|
|
602
602
|
...args,
|
|
603
603
|
stream: true,
|
|
604
|
-
|
|
605
|
-
|
|
604
|
+
stream_options: {
|
|
605
|
+
include_usage: true
|
|
606
|
+
}
|
|
606
607
|
};
|
|
607
608
|
const { responseHeaders, value: response } = await postJsonToApi({
|
|
608
609
|
url: this.config.url({
|
|
@@ -1187,8 +1188,9 @@ var OpenAICompletionLanguageModel = class {
|
|
|
1187
1188
|
const body = {
|
|
1188
1189
|
...args,
|
|
1189
1190
|
stream: true,
|
|
1190
|
-
|
|
1191
|
-
|
|
1191
|
+
stream_options: {
|
|
1192
|
+
include_usage: true
|
|
1193
|
+
}
|
|
1192
1194
|
};
|
|
1193
1195
|
const { responseHeaders, value: response } = await postJsonToApi2({
|
|
1194
1196
|
url: this.config.url({
|