openai-node
openai-node copied to clipboard
Incorrect TS typing for `finish_reason`
Describe the bug
The typing for finish_reason sets its type to string | undefined but its actual type used is string | null.
To Reproduce
Reference a CreateChatCompletionResponse object and access the finish_reason property to inspect its type.
Code snippets
No response
OS
macOS v13.1 (22C65)
Node version
node v18.12.1
Library version
openai v3.2.1