Skip to content

Commit

Permalink
chore: lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jun 12, 2024
1 parent bb7671a commit f0f6dc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion langchain-core/src/language_models/chat_models.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { z } from "zod";
import {
AIMessage,
type BaseMessage,
Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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<any, any, any, any>;

Check failure on line 797 in langchain-core/src/language_models/chat_models.ts

View workflow job for this annotation

GitHub Actions / Check linting

Unexpected any. Specify a different type

Check failure on line 797 in langchain-core/src/language_models/chat_models.ts

View workflow job for this annotation

GitHub Actions / Check linting

Unexpected any. Specify a different type

Check failure on line 797 in langchain-core/src/language_models/chat_models.ts

View workflow job for this annotation

GitHub Actions / Check linting

Unexpected any. Specify a different type

Check failure on line 797 in langchain-core/src/language_models/chat_models.ts

View workflow job for this annotation

GitHub Actions / Check linting

Unexpected any. Specify a different type

async _call(_input: z.infer<typeof this.schema>): Promise<string> {
Expand Down

0 comments on commit f0f6dc8

Please sign in to comment.