@langchain/openai 0.5.8 → 0.5.9
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 -1
- package/dist/chat_models.js +3 -1
- package/package.json +1 -1
package/dist/chat_models.cjs
CHANGED
|
@@ -433,6 +433,7 @@ function _convertOpenAIResponsesMessageToBaseMessage(response) {
|
|
|
433
433
|
error.name = response.error.code;
|
|
434
434
|
throw error;
|
|
435
435
|
}
|
|
436
|
+
let messageId;
|
|
436
437
|
const content = [];
|
|
437
438
|
const tool_calls = [];
|
|
438
439
|
const invalid_tool_calls = [];
|
|
@@ -451,6 +452,7 @@ function _convertOpenAIResponsesMessageToBaseMessage(response) {
|
|
|
451
452
|
const additional_kwargs = {};
|
|
452
453
|
for (const item of response.output) {
|
|
453
454
|
if (item.type === "message") {
|
|
455
|
+
messageId = item.id;
|
|
454
456
|
content.push(...item.content.flatMap((part) => {
|
|
455
457
|
if (part.type === "output_text") {
|
|
456
458
|
if ("parsed" in part && part.parsed != null) {
|
|
@@ -501,7 +503,7 @@ function _convertOpenAIResponsesMessageToBaseMessage(response) {
|
|
|
501
503
|
}
|
|
502
504
|
}
|
|
503
505
|
return new messages_1.AIMessage({
|
|
504
|
-
id:
|
|
506
|
+
id: messageId,
|
|
505
507
|
content,
|
|
506
508
|
tool_calls,
|
|
507
509
|
invalid_tool_calls,
|
package/dist/chat_models.js
CHANGED
|
@@ -428,6 +428,7 @@ function _convertOpenAIResponsesMessageToBaseMessage(response) {
|
|
|
428
428
|
error.name = response.error.code;
|
|
429
429
|
throw error;
|
|
430
430
|
}
|
|
431
|
+
let messageId;
|
|
431
432
|
const content = [];
|
|
432
433
|
const tool_calls = [];
|
|
433
434
|
const invalid_tool_calls = [];
|
|
@@ -446,6 +447,7 @@ function _convertOpenAIResponsesMessageToBaseMessage(response) {
|
|
|
446
447
|
const additional_kwargs = {};
|
|
447
448
|
for (const item of response.output) {
|
|
448
449
|
if (item.type === "message") {
|
|
450
|
+
messageId = item.id;
|
|
449
451
|
content.push(...item.content.flatMap((part) => {
|
|
450
452
|
if (part.type === "output_text") {
|
|
451
453
|
if ("parsed" in part && part.parsed != null) {
|
|
@@ -496,7 +498,7 @@ function _convertOpenAIResponsesMessageToBaseMessage(response) {
|
|
|
496
498
|
}
|
|
497
499
|
}
|
|
498
500
|
return new AIMessage({
|
|
499
|
-
id:
|
|
501
|
+
id: messageId,
|
|
500
502
|
content,
|
|
501
503
|
tool_calls,
|
|
502
504
|
invalid_tool_calls,
|