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