@langchain/openai 0.4.7 → 0.4.8
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 +3 -3
- package/dist/chat_models.js +3 -3
- package/dist/llms.cjs +1 -1
- package/dist/llms.js +1 -1
- package/package.json +1 -1
package/dist/chat_models.cjs
CHANGED
|
@@ -68,11 +68,11 @@ function _convertMessagesToOpenAIParams(messages, model) {
|
|
|
68
68
|
}
|
|
69
69
|
if (message.additional_kwargs.function_call != null) {
|
|
70
70
|
completionParam.function_call = message.additional_kwargs.function_call;
|
|
71
|
-
completionParam.content =
|
|
71
|
+
completionParam.content = "";
|
|
72
72
|
}
|
|
73
73
|
if ((0, messages_1.isAIMessage)(message) && !!message.tool_calls?.length) {
|
|
74
74
|
completionParam.tool_calls = message.tool_calls.map(openai_tools_1.convertLangChainToolCallToOpenAI);
|
|
75
|
-
completionParam.content =
|
|
75
|
+
completionParam.content = "";
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
78
|
if (message.additional_kwargs.tool_calls != null) {
|
|
@@ -1244,7 +1244,7 @@ class ChatOpenAI extends chat_models_1.BaseChatModel {
|
|
|
1244
1244
|
this.n = fields?.n ?? this.n;
|
|
1245
1245
|
this.logitBias = fields?.logitBias;
|
|
1246
1246
|
this.stop = fields?.stopSequences ?? fields?.stop;
|
|
1247
|
-
this.stopSequences = this
|
|
1247
|
+
this.stopSequences = this.stop;
|
|
1248
1248
|
this.user = fields?.user;
|
|
1249
1249
|
this.__includeRawResponse = fields?.__includeRawResponse;
|
|
1250
1250
|
this.audio = fields?.audio;
|
package/dist/chat_models.js
CHANGED
|
@@ -64,11 +64,11 @@ export function _convertMessagesToOpenAIParams(messages, model) {
|
|
|
64
64
|
}
|
|
65
65
|
if (message.additional_kwargs.function_call != null) {
|
|
66
66
|
completionParam.function_call = message.additional_kwargs.function_call;
|
|
67
|
-
completionParam.content =
|
|
67
|
+
completionParam.content = "";
|
|
68
68
|
}
|
|
69
69
|
if (isAIMessage(message) && !!message.tool_calls?.length) {
|
|
70
70
|
completionParam.tool_calls = message.tool_calls.map(convertLangChainToolCallToOpenAI);
|
|
71
|
-
completionParam.content =
|
|
71
|
+
completionParam.content = "";
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
74
|
if (message.additional_kwargs.tool_calls != null) {
|
|
@@ -1239,7 +1239,7 @@ export class ChatOpenAI extends BaseChatModel {
|
|
|
1239
1239
|
this.n = fields?.n ?? this.n;
|
|
1240
1240
|
this.logitBias = fields?.logitBias;
|
|
1241
1241
|
this.stop = fields?.stopSequences ?? fields?.stop;
|
|
1242
|
-
this.stopSequences = this
|
|
1242
|
+
this.stopSequences = this.stop;
|
|
1243
1243
|
this.user = fields?.user;
|
|
1244
1244
|
this.__includeRawResponse = fields?.__includeRawResponse;
|
|
1245
1245
|
this.audio = fields?.audio;
|
package/dist/llms.cjs
CHANGED
|
@@ -235,7 +235,7 @@ class OpenAI extends llms_1.BaseLLM {
|
|
|
235
235
|
this.bestOf = fields?.bestOf ?? this.bestOf;
|
|
236
236
|
this.logitBias = fields?.logitBias;
|
|
237
237
|
this.stop = fields?.stopSequences ?? fields?.stop;
|
|
238
|
-
this.stopSequences =
|
|
238
|
+
this.stopSequences = this.stop;
|
|
239
239
|
this.user = fields?.user;
|
|
240
240
|
this.streaming = fields?.streaming ?? false;
|
|
241
241
|
if (this.streaming && this.bestOf && this.bestOf > 1) {
|
package/dist/llms.js
CHANGED
|
@@ -232,7 +232,7 @@ export class OpenAI extends BaseLLM {
|
|
|
232
232
|
this.bestOf = fields?.bestOf ?? this.bestOf;
|
|
233
233
|
this.logitBias = fields?.logitBias;
|
|
234
234
|
this.stop = fields?.stopSequences ?? fields?.stop;
|
|
235
|
-
this.stopSequences =
|
|
235
|
+
this.stopSequences = this.stop;
|
|
236
236
|
this.user = fields?.user;
|
|
237
237
|
this.streaming = fields?.streaming ?? false;
|
|
238
238
|
if (this.streaming && this.bestOf && this.bestOf > 1) {
|