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