-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
- This is a feature request for the Node library
Describe the feature or improvement you're requesting
With the current version its is possible to have undocumented request parameters and response parameters. But if one also returns undocumente errors which are not matching the openai layout the response is basically not accessible.
It would be nice if the error could contain a .raw
property which allows to access the original body and headers.
Additional context
e.g. this would be possible:
try {
new OpenAI({...}).chat.completions.create({
model,
messages,
stream: true
});
} catch (error) {
// Access undocumented properties, e.g. RFC specified error properties
console.log(error.detail)
}
```