openai-node icon indicating copy to clipboard operation
openai-node copied to clipboard

Incorrect TS typing for `finish_reason`

Open brandonmcconnell opened this issue 2 years ago • 0 comments

Describe the bug

image image

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

brandonmcconnell avatar Mar 03 '23 01:03 brandonmcconnell