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

Type CreateChatCompletionResponse doesn't seem to be exported correctly

Open chanmathew opened this issue 2 years ago • 3 comments

Describe the bug

On 3.2.1, can't seem to find the CreateChatCompletionResponse type definition, even though I see it in the definitions file: https://github.com/openai/openai-node/blob/master/dist/api.d.ts#L345

No exported member detected when trying to export it in my TS project: CleanShot 2023-03-03 at 22 27 09@2x

To Reproduce

  1. Try to import type CreateChatCompletionResponse from openai
  2. Cannot find type declaration

Code snippets

No response

OS

macOS

Node version

Node v16.17.0

Library version

openai v3.2.1

chanmathew avatar Mar 04 '23 03:03 chanmathew

I'm having the same issue.

joseshiru avatar Mar 06 '23 07:03 joseshiru

Try updating the library. Inside your project npm update openai

murtio avatar Mar 08 '23 00:03 murtio

Try updating the library. Inside your project npm update openai

It's already on the latest version. Even tried reinstalling the latest just now, still same issue.

chanmathew avatar Mar 08 '23 00:03 chanmathew

Our fully rewritten upcoming v4 redoes our types; you should be able to import types more easily now (though note, all the types are different).

rattrayalex avatar Jul 10 '23 01:07 rattrayalex