From c47097589344f2e1f00ac16517e2791fe6562c5d Mon Sep 17 00:00:00 2001 From: bracesproul Date: Tue, 30 Jul 2024 15:09:35 -0700 Subject: [PATCH] chore: lint files --- libs/langchain-anthropic/src/chat_models.ts | 7 ++----- libs/langchain-anthropic/src/types.ts | 6 ++---- libs/langchain-anthropic/src/utils/tools.ts | 4 +--- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/libs/langchain-anthropic/src/chat_models.ts b/libs/langchain-anthropic/src/chat_models.ts index e9db567b5277..d0b00d466058 100644 --- a/libs/langchain-anthropic/src/chat_models.ts +++ b/libs/langchain-anthropic/src/chat_models.ts @@ -31,11 +31,9 @@ import type { Tool as AnthropicTool, } from "@anthropic-ai/sdk/resources/index.mjs"; +import { isLangChainTool } from "@langchain/core/utils/function_calling"; import { AnthropicToolsOutputParser } from "./output_parsers.js"; -import { - extractToolCallChunk, - handleToolChoice, -} from "./utils/tools.js"; +import { extractToolCallChunk, handleToolChoice } from "./utils/tools.js"; import { _formatMessagesForAnthropic } from "./utils/message_inputs.js"; import { _makeMessageChunkFromAnthropicEvent, @@ -49,7 +47,6 @@ import { AnthropicToolChoice, AnthropicToolTypes, } from "./types.js"; -import { isLangChainTool } from "@langchain/core/utils/function_calling"; export interface ChatAnthropicCallOptions extends BaseChatModelCallOptions, diff --git a/libs/langchain-anthropic/src/types.ts b/libs/langchain-anthropic/src/types.ts index f7474f2ed68f..9ef828fabb8c 100644 --- a/libs/langchain-anthropic/src/types.ts +++ b/libs/langchain-anthropic/src/types.ts @@ -1,7 +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/index.mjs"; import { BindToolsInput } from "@langchain/core/language_models/chat_models"; export type AnthropicToolResponse = { @@ -31,4 +29,4 @@ export type AnthropicToolChoice = | "none" | string; -export type AnthropicToolTypes = AnthropicTool | BindToolsInput; \ No newline at end of file +export type AnthropicToolTypes = AnthropicTool | BindToolsInput; diff --git a/libs/langchain-anthropic/src/utils/tools.ts b/libs/langchain-anthropic/src/utils/tools.ts index 33fda5df1493..a56bd22e2a49 100644 --- a/libs/langchain-anthropic/src/utils/tools.ts +++ b/libs/langchain-anthropic/src/utils/tools.ts @@ -1,6 +1,4 @@ -import type { - MessageCreateParams, -} from "@anthropic-ai/sdk/resources/index.mjs"; +import type { MessageCreateParams } from "@anthropic-ai/sdk/resources/index.mjs"; import { AIMessageChunk } from "@langchain/core/messages"; import { ToolCallChunk } from "@langchain/core/messages/tool"; import { AnthropicToolChoice } from "../types.js";