You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is a Node library issue and not an underlying OpenAI API issue
This is an issue with the Node library
Describe the bug
The type of AutoParseableTool is incorrectly describing $callback as receiving the arguments zod schema as input while it should have the inferred zod type of the arguments zod schema.
To Reproduce
Define a tool with the import { zodFunction } from 'openai/helpers/zod'; helper.
Check the inferred type of $callback property on the tool.
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
The type of
AutoParseableTool
is incorrectly describing$callback
as receiving the arguments zod schema as input while it should have the inferred zod type of the arguments zod schema.To Reproduce
import { zodFunction } from 'openai/helpers/zod';
helper.$callback
property on the tool.Code snippets
Can be fixed by adding
zodInfer<...>
here:openai-node/src/lib/parser.ts
Lines 66 to 77 in 3fdc7d4
So
$callback
will become:OS
macOS
Node version
Node v20.15.1
Library version
openai v4.76.3
The text was updated successfully, but these errors were encountered: