@langchain/openai 0.4.6 → 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 -4
- package/dist/chat_models.js +3 -4
- 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) {
|
|
@@ -126,7 +126,6 @@ function _convertMessagesToOpenAIResponsesParams(messages, model) {
|
|
|
126
126
|
type: "computer_call_output",
|
|
127
127
|
output,
|
|
128
128
|
call_id: toolMessage.tool_call_id,
|
|
129
|
-
id: toolMessage.id,
|
|
130
129
|
};
|
|
131
130
|
}
|
|
132
131
|
return {
|
|
@@ -1245,7 +1244,7 @@ class ChatOpenAI extends chat_models_1.BaseChatModel {
|
|
|
1245
1244
|
this.n = fields?.n ?? this.n;
|
|
1246
1245
|
this.logitBias = fields?.logitBias;
|
|
1247
1246
|
this.stop = fields?.stopSequences ?? fields?.stop;
|
|
1248
|
-
this.stopSequences = this
|
|
1247
|
+
this.stopSequences = this.stop;
|
|
1249
1248
|
this.user = fields?.user;
|
|
1250
1249
|
this.__includeRawResponse = fields?.__includeRawResponse;
|
|
1251
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) {
|
|
@@ -121,7 +121,6 @@ function _convertMessagesToOpenAIResponsesParams(messages, model) {
|
|
|
121
121
|
type: "computer_call_output",
|
|
122
122
|
output,
|
|
123
123
|
call_id: toolMessage.tool_call_id,
|
|
124
|
-
id: toolMessage.id,
|
|
125
124
|
};
|
|
126
125
|
}
|
|
127
126
|
return {
|
|
@@ -1240,7 +1239,7 @@ export class ChatOpenAI extends BaseChatModel {
|
|
|
1240
1239
|
this.n = fields?.n ?? this.n;
|
|
1241
1240
|
this.logitBias = fields?.logitBias;
|
|
1242
1241
|
this.stop = fields?.stopSequences ?? fields?.stop;
|
|
1243
|
-
this.stopSequences = this
|
|
1242
|
+
this.stopSequences = this.stop;
|
|
1244
1243
|
this.user = fields?.user;
|
|
1245
1244
|
this.__includeRawResponse = fields?.__includeRawResponse;
|
|
1246
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) {
|