@langchain/anthropic 0.3.16 → 0.3.17
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
|
@@ -642,7 +642,9 @@ class ChatAnthropicMessages extends chat_models_1.BaseChatModel {
|
|
|
642
642
|
return {
|
|
643
643
|
name: tool.name,
|
|
644
644
|
description: tool.description,
|
|
645
|
-
input_schema: (0,
|
|
645
|
+
input_schema: ((0, types_1.isZodSchema)(tool.schema)
|
|
646
|
+
? (0, zod_to_json_schema_1.zodToJsonSchema)(tool.schema)
|
|
647
|
+
: tool.schema),
|
|
646
648
|
};
|
|
647
649
|
}
|
|
648
650
|
throw new Error(`Unknown tool type passed to ChatAnthropic: ${JSON.stringify(tool, null, 2)}`);
|
package/dist/chat_models.js
CHANGED
|
@@ -639,7 +639,9 @@ export class ChatAnthropicMessages extends BaseChatModel {
|
|
|
639
639
|
return {
|
|
640
640
|
name: tool.name,
|
|
641
641
|
description: tool.description,
|
|
642
|
-
input_schema:
|
|
642
|
+
input_schema: (isZodSchema(tool.schema)
|
|
643
|
+
? zodToJsonSchema(tool.schema)
|
|
644
|
+
: tool.schema),
|
|
643
645
|
};
|
|
644
646
|
}
|
|
645
647
|
throw new Error(`Unknown tool type passed to ChatAnthropic: ${JSON.stringify(tool, null, 2)}`);
|