From c5c1ac15e3619d4c776d94d98b89e4c3fb2b52ee Mon Sep 17 00:00:00 2001 From: Nicolas Brichet <32258950+brichet@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:24:41 +0100 Subject: [PATCH] Fix anthropic sdk import (#7334) --- libs/langchain-anthropic/src/chat_models.ts | 2 +- libs/langchain-anthropic/src/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/langchain-anthropic/src/chat_models.ts b/libs/langchain-anthropic/src/chat_models.ts index f474324b37cd..480de0a7c57e 100644 --- a/libs/langchain-anthropic/src/chat_models.ts +++ b/libs/langchain-anthropic/src/chat_models.ts @@ -28,7 +28,7 @@ import { z } from "zod"; import type { MessageCreateParams, Tool as AnthropicTool, -} from "@anthropic-ai/sdk/resources/index.mjs"; +} from "@anthropic-ai/sdk/resources/messages"; import { isLangChainTool } from "@langchain/core/utils/function_calling"; import { AnthropicToolsOutputParser } from "./output_parsers.js"; diff --git a/libs/langchain-anthropic/src/types.ts b/libs/langchain-anthropic/src/types.ts index ff84cec243eb..fb289b84b019 100644 --- a/libs/langchain-anthropic/src/types.ts +++ b/libs/langchain-anthropic/src/types.ts @@ -1,5 +1,5 @@ import Anthropic from "@anthropic-ai/sdk"; -import type { Tool as AnthropicTool } from "@anthropic-ai/sdk/resources/index.mjs"; +import type { Tool as AnthropicTool } from "@anthropic-ai/sdk/resources/messages"; import { BindToolsInput } from "@langchain/core/language_models/chat_models"; export type AnthropicToolResponse = {