@langchain/anthropic 0.1.11 → 0.1.12
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 -5
- package/dist/chat_models.js +3 -5
- package/package.json +1 -1
package/dist/chat_models.cjs
CHANGED
|
@@ -422,13 +422,11 @@ class ChatAnthropicMessages extends chat_models_1.BaseChatModel {
|
|
|
422
422
|
text: contentPart.text,
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
|
-
else if (contentPart.type === "tool_use"
|
|
425
|
+
else if (contentPart.type === "tool_use" ||
|
|
426
|
+
contentPart.type === "tool_result") {
|
|
426
427
|
// TODO: Fix when SDK types are fixed
|
|
427
428
|
return {
|
|
428
|
-
|
|
429
|
-
id: contentPart.id,
|
|
430
|
-
name: contentPart.name,
|
|
431
|
-
input: contentPart.input,
|
|
429
|
+
...contentPart,
|
|
432
430
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
433
431
|
};
|
|
434
432
|
}
|
package/dist/chat_models.js
CHANGED
|
@@ -419,13 +419,11 @@ export class ChatAnthropicMessages extends BaseChatModel {
|
|
|
419
419
|
text: contentPart.text,
|
|
420
420
|
};
|
|
421
421
|
}
|
|
422
|
-
else if (contentPart.type === "tool_use"
|
|
422
|
+
else if (contentPart.type === "tool_use" ||
|
|
423
|
+
contentPart.type === "tool_result") {
|
|
423
424
|
// TODO: Fix when SDK types are fixed
|
|
424
425
|
return {
|
|
425
|
-
|
|
426
|
-
id: contentPart.id,
|
|
427
|
-
name: contentPart.name,
|
|
428
|
-
input: contentPart.input,
|
|
426
|
+
...contentPart,
|
|
429
427
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
430
428
|
};
|
|
431
429
|
}
|