Convert a runnable to a tool. Return a new instance of RunnableToolLike
which contains the runnable, name, description and schema.
asTool<
T extends StructuredToolCallInput<ZodObject<__type, "strip", ZodTypeAny, __type, __type>, __type> = StructuredToolCallInput<ZodObject<__type, "strip", ZodTypeAny, __type, __type>, __type>
>(fields: __type): RunnableToolLike<InteropZodType<T | ToolCall<string, Record<string, any>>>, any>| Name | Type | Description |
|---|---|---|
fields* | __type |