The tool to convert to an OpenAI tool.
Optional
fields: number | { strict?: boolean }Optional
strict?: booleanIf true
, model output is guaranteed to exactly match the JSON Schema
provided in the function definition.
The inputted tool in OpenAI tool format.
Formats a
StructuredTool
orRunnableToolLike
instance into a format that is compatible with OpenAI tool calling. IfStructuredTool
orRunnableToolLike
has a zod schema, the output will be converted into a JSON schema, which is then used as the parameters for the OpenAI tool.