From f0f6dc833a12c95267886b3d47d9c688606dff9a Mon Sep 17 00:00:00 2001 From: bracesproul Date: Tue, 11 Jun 2024 17:11:18 -0700 Subject: [PATCH] chore: lint files --- langchain-core/src/language_models/chat_models.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/langchain-core/src/language_models/chat_models.ts b/langchain-core/src/language_models/chat_models.ts index cb33e7a28827..c7c75d23f391 100644 --- a/langchain-core/src/language_models/chat_models.ts +++ b/langchain-core/src/language_models/chat_models.ts @@ -1,3 +1,4 @@ +import { z } from "zod"; import { AIMessage, type BaseMessage, @@ -40,7 +41,6 @@ import { import { isStreamEventsHandler } from "../tracers/event_stream.js"; import { isLogStreamHandler } from "../tracers/log_stream.js"; import { concat } from "../utils/stream.js"; -import { z } from "zod"; import { RunnablePassthrough } from "../runnables/passthrough.js"; import { isZodSchema } from "../utils/types/is_zod_schema.js"; @@ -791,7 +791,9 @@ export abstract class BaseChatModel< if (isZodSchema(schema)) { class Tool extends StructuredTool { name = functionName; + description = schema.description ?? "A function available to call."; + schema = schema as z.ZodObject; async _call(_input: z.infer): Promise {