New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Non-Node Envs] Make openai classes use fetch, remove use of node-fetch #118
Conversation
Looks like https://github.com/vespaiach/axios-fetch-adapter doesn't support CJS. It's small enough and doesn't really have any deps besides axios that we could just pull the one adapter function into our codebase. Also looks like axios has an open PR to add fetch support natively: axios/axios#5146 so we could eventually remove whatever we go with here. |
@sullivan-sean yea or we wait until going for a full ESM build to merge this one, which was my plan, hopefully I can fix the remaining issues in #124 |
@sullivan-sean I did what you suggested, in #124 , that package has a misconfigured package.json |
* Add integration tests GH action (manual trigger for now), reduce cost of integration tests by using smallest possible models * Convert library to ESM codebase, ESM output (#124) * Use fetch adapter for openai axios * Update tsc build to output ESM only * Update all import paths to have extension per ESM requirements * Move all source files to src/ * Remove circular dependency * Fix jest config for ESM * Remove circular deps not possible with ESM * Throw error in index getter to dedupe code and have safer usage (#35) * Fix hnsw for esm * Fix usage of hnswlib with index passed in * Fix textsplitter for esm * Fix openai for esm * Fix hf for esm * Fix ESM for cohere * Fix ESM for serpapi * Fix esm in srt * Remove dependency on @vespaiach/axios-fetch-adapter which has an incorrect export * Fix examples for esm * Fix entrypoints * Fix test-exports for esm * Add fetch flag for node 16 ci job * Add a more thorough test for packaging * Fix docs build --------- Co-authored-by: micahriggan <micahriggan@users.noreply.github.com> --------- Co-authored-by: micahriggan <micahriggan@users.noreply.github.com>
Adds installation instructions for node 16