Function: toOpenAIFunction()
Makaio Framework / tools-core / toOpenAIFunction
Function: toOpenAIFunction()
Section titled “Function: toOpenAIFunction()”toOpenAIFunction(
tool):OpenAIFunctionDefinition
Defined in: ../../../tools/core/src/export.ts:134
Converts a ToolDefinition to OpenAI function format.
Parameters
Section titled “Parameters”Makaio tool definition
Returns
Section titled “Returns”OpenAI-compatible function definition
Example
Section titled “Example”const openAIFunc = toOpenAIFunction(readFileTool);// Result:// {// name: 'readFile',// description: 'Reads a file from the filesystem',// parameters: { type: 'object', properties: { path: { type: 'string' } }, ... }// }