@ai-sdk/openai 3.0.35 → 3.0.36
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 +13 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +1 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/chat/openai-chat-language-model.ts +4 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -997,7 +997,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
997
997
|
for (const toolCallDelta of delta.tool_calls) {
|
|
998
998
|
const index = toolCallDelta.index;
|
|
999
999
|
if (toolCalls[index] == null) {
|
|
1000
|
-
if (toolCallDelta.type !== "function") {
|
|
1000
|
+
if (toolCallDelta.type != null && toolCallDelta.type !== "function") {
|
|
1001
1001
|
throw new InvalidResponseDataError({
|
|
1002
1002
|
data: toolCallDelta,
|
|
1003
1003
|
message: `Expected 'function' type.`
|