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

chore(openapi): build script to setup ESM/CJS module exports + various fixes

Open gfortaine opened this issue 2 years ago • 5 comments

1 PR to rule them all 😉 cc @schnerd @shun-shobon @ericlewis :

° Changelog

gfortaine avatar Jan 04 '23 17:01 gfortaine

Related https://github.com/openai/openai-node/pull/45

gfortaine avatar Jan 04 '23 18:01 gfortaine

Isomorphic __dirname is tricky but can be done, you have to make guarantees about the file structure but it can be achieved with a polyfill and added as a banner to Esbuild. See: https://github.com/tsmodule/tsmodule/blob/master/src/specification/shim.ts

Nice work on this also.

ctjlewis avatar Jan 19 '23 19:01 ctjlewis

This new typescript generator is also listed as "Experimental" – do you know what's experimental about it? I'm a little hesitant to fully switch our production SDK over to something that is still marked as experimental. Have other well-known projects started using this generator?

schnerd avatar Jan 22 '23 01:01 schnerd

This new typescript generator is also listed as "Experimental" – do you know what's experimental about it? I'm a little hesitant to fully switch our production SDK over to something that is still marked as experimental. Have other well-known projects started using this generator?

gfortaine avatar Jan 22 '23 01:01 gfortaine

This new typescript generator is also listed as "Experimental" – do you know what's experimental about it? I'm a little hesitant to fully switch our production SDK over to something that is still marked as experimental. Have other well-known projects started using this generator?

By the way, we tried with typescript-fetch in the first place. However, it seems that there is a nasty bug when using oneOf

gfortaine avatar Jan 22 '23 12:01 gfortaine

Now that we have the updated NodeSDK, I am going to close this PR. Please let me know if there's further discussion needed here and thanks for diving in on this originally!

logankilpatrick avatar Aug 31 '23 23:08 logankilpatrick