@langchain/openai 0.5.2 → 0.5.3
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/dist/chat_models.cjs +6 -2
- package/dist/chat_models.js +6 -2
- package/package.json +1 -1
package/dist/chat_models.cjs
CHANGED
|
@@ -1295,11 +1295,15 @@ class ChatOpenAI extends chat_models_1.BaseChatModel {
|
|
|
1295
1295
|
this.reasoningEffort = fields?.reasoningEffort;
|
|
1296
1296
|
this.maxTokens = fields?.maxCompletionTokens ?? fields?.maxTokens;
|
|
1297
1297
|
this.useResponsesApi = fields?.useResponsesApi ?? this.useResponsesApi;
|
|
1298
|
-
|
|
1298
|
+
this.disableStreaming = fields?.disableStreaming ?? this.disableStreaming;
|
|
1299
|
+
if (this.model === "o1")
|
|
1299
1300
|
this.disableStreaming = true;
|
|
1300
|
-
}
|
|
1301
1301
|
this.streaming = fields?.streaming ?? false;
|
|
1302
|
+
if (this.disableStreaming)
|
|
1303
|
+
this.streaming = false;
|
|
1302
1304
|
this.streamUsage = fields?.streamUsage ?? this.streamUsage;
|
|
1305
|
+
if (this.disableStreaming)
|
|
1306
|
+
this.streamUsage = false;
|
|
1303
1307
|
this.clientConfig = {
|
|
1304
1308
|
apiKey: this.apiKey,
|
|
1305
1309
|
organization: this.organization,
|
package/dist/chat_models.js
CHANGED
|
@@ -1290,11 +1290,15 @@ export class ChatOpenAI extends BaseChatModel {
|
|
|
1290
1290
|
this.reasoningEffort = fields?.reasoningEffort;
|
|
1291
1291
|
this.maxTokens = fields?.maxCompletionTokens ?? fields?.maxTokens;
|
|
1292
1292
|
this.useResponsesApi = fields?.useResponsesApi ?? this.useResponsesApi;
|
|
1293
|
-
|
|
1293
|
+
this.disableStreaming = fields?.disableStreaming ?? this.disableStreaming;
|
|
1294
|
+
if (this.model === "o1")
|
|
1294
1295
|
this.disableStreaming = true;
|
|
1295
|
-
}
|
|
1296
1296
|
this.streaming = fields?.streaming ?? false;
|
|
1297
|
+
if (this.disableStreaming)
|
|
1298
|
+
this.streaming = false;
|
|
1297
1299
|
this.streamUsage = fields?.streamUsage ?? this.streamUsage;
|
|
1300
|
+
if (this.disableStreaming)
|
|
1301
|
+
this.streamUsage = false;
|
|
1298
1302
|
this.clientConfig = {
|
|
1299
1303
|
apiKey: this.apiKey,
|
|
1300
1304
|
organization: this.organization,
|