diff --git a/libs/langchain-community/src/chat_models/bedrock/web.ts b/libs/langchain-community/src/chat_models/bedrock/web.ts index 56198dad4236..88e214c2d885 100644 --- a/libs/langchain-community/src/chat_models/bedrock/web.ts +++ b/libs/langchain-community/src/chat_models/bedrock/web.ts @@ -13,7 +13,6 @@ import { } from "@langchain/core/language_models/chat_models"; import { BaseLanguageModelInput, - StructuredOutputMethodOptions, ToolDefinition, } from "@langchain/core/language_models/base"; import { Runnable } from "@langchain/core/runnables"; @@ -37,7 +36,6 @@ import { ToolCall } from "@langchain/core/messages/tool"; import { zodToJsonSchema } from "zod-to-json-schema"; import { isOpenAITool } from "@langchain/core/utils/is_openai_tool"; -import { type z } from "zod"; import type { SerializedFields } from "../../load/map_keys.js"; import { BaseBedrockInput, @@ -762,61 +760,6 @@ export class BedrockChat this._anthropicTools = formatTools(tools); return this; } - -// withStructuredOutput< -// // eslint-disable-next-line @typescript-eslint/no-explicit-any -// RunOutput extends Record = Record -// >( -// outputSchema: -// | z.ZodType -// // eslint-disable-next-line @typescript-eslint/no-explicit-any -// | Record, -// config?: StructuredOutputMethodOptions -// ): Runnable; - -// withStructuredOutput< -// // eslint-disable-next-line @typescript-eslint/no-explicit-any -// RunOutput extends Record = Record -// >( -// outputSchema: -// | z.ZodType -// // eslint-disable-next-line @typescript-eslint/no-explicit-any -// | Record, -// config?: StructuredOutputMethodOptions -// ): Runnable; - -// withStructuredOutput< -// // eslint-disable-next-line @typescript-eslint/no-explicit-any -// RunOutput extends Record = Record -// >( -// outputSchema: -// | z.ZodType -// // eslint-disable-next-line @typescript-eslint/no-explicit-any -// | Record, -// config?: StructuredOutputMethodOptions -// ): -// | Runnable -// | Runnable< -// BaseLanguageModelInput, -// { raw: BaseMessage; parsed: RunOutput } -// > { -// if (!super.withStructuredOutput) { -// throw new Error(`withStructuredOutput is not implemented in the base class. -// This is likely due to an outdated version of "@langchain/core". -// Please upgrade to the latest version.`); -// } -// if (config?.includeRaw) { -// return super.withStructuredOutput(outputSchema, { -// ...config, -// includeRaw: true, -// }); -// } else { -// return super.withStructuredOutput(outputSchema, { -// ...config, -// includeRaw: false, -// }); -// } -// } } function isChatGenerationChunk(