import { ... } from "@langchain/core/utils/function_calling";Formats a StructuredTool or RunnableToolLike instance into a format
that is compatible with OpenAI function calling. If StructuredTool or
RunnableToolLike has a zod schema, the output will be converted into a
JSON schema, which is then used as the parameters for the OpenAI tool.
Formats a StructuredTool or RunnableToolLike instance into a
format that is compatible with OpenAI tool calling. If StructuredTool or
RunnableToolLike has a zod schema, the output will be converted into a
JSON schema, which is then used as the parameters for the OpenAI tool.
Whether or not the tool is one of StructuredTool, RunnableTool or StructuredToolParams.
It returns is StructuredToolParams since that is the most minimal interface of the three,
while still containing the necessary properties to be passed to a LLM for tool calling.
Confirm whether the inputted tool is an instance of RunnableToolLike.
Confirm whether the inputted tool is an instance of StructuredToolInterface.
Confirm whether or not the tool contains the necessary properties to be considered a StructuredToolParams.