@langchain/anthropic 0.2.2 → 0.2.3

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.
@@ -784,7 +784,10 @@ class ChatAnthropicMessages extends chat_models_1.BaseChatModel {
784
784
  }
785
785
  const llm = this.bind({
786
786
  tools,
787
- tool_choice: "any",
787
+ tool_choice: {
788
+ type: "tool",
789
+ name: functionName,
790
+ },
788
791
  });
789
792
  if (!includeRaw) {
790
793
  return llm.pipe(outputParser).withConfig({
@@ -780,7 +780,10 @@ export class ChatAnthropicMessages extends BaseChatModel {
780
780
  }
781
781
  const llm = this.bind({
782
782
  tools,
783
- tool_choice: "any",
783
+ tool_choice: {
784
+ type: "tool",
785
+ name: functionName,
786
+ },
784
787
  });
785
788
  if (!includeRaw) {
786
789
  return llm.pipe(outputParser).withConfig({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/anthropic",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Anthropic integrations for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {