Skip to content

Commit

Permalink
drop unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jun 12, 2024
1 parent b92a5f7 commit 8df3aa8
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions libs/langchain-community/src/chat_models/bedrock/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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,
Expand Down Expand Up @@ -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<string, any> = Record<string, any>
// >(
// outputSchema:
// | z.ZodType<RunOutput>
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// | Record<string, any>,
// config?: StructuredOutputMethodOptions<false>
// ): Runnable<BaseLanguageModelInput, RunOutput>;

// withStructuredOutput<
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// RunOutput extends Record<string, any> = Record<string, any>
// >(
// outputSchema:
// | z.ZodType<RunOutput>
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// | Record<string, any>,
// config?: StructuredOutputMethodOptions<true>
// ): Runnable<BaseLanguageModelInput, { raw: BaseMessage; parsed: RunOutput }>;

// withStructuredOutput<
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// RunOutput extends Record<string, any> = Record<string, any>
// >(
// outputSchema:
// | z.ZodType<RunOutput>
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// | Record<string, any>,
// config?: StructuredOutputMethodOptions<boolean>
// ):
// | Runnable<BaseLanguageModelInput, RunOutput>
// | 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(
Expand Down

0 comments on commit 8df3aa8

Please sign in to comment.