Skip to content
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

Replace axios and other dependencies with native counterparts, add type support for stream #17

Closed
wants to merge 6 commits into from

Conversation

dqbd
Copy link

@dqbd dqbd commented Feb 23, 2023

This PR replaces NPM dependencies such asaxios and form-data with native counterparts, making the codebase lighter and available for different non-Node environments.

We are aware of the existing pull requests for this feature (see #10, thanks @gfortaine), but this PR aims to be a more lightweight implementation (no external dependencies needed) and with a similar API to reduce migration friction.

Additionally, we have added type support for streaming, which enables TypeScript to return correct types when stream: true. This makes it easier for developers to work with streams in a type-safe manner.

CleanShot.2023-02-23.at.15.41.18.mp4

Changelog:

@gfortaine
Copy link

@athyuttamre
Copy link
Collaborator

This PR is better suited for the openai-node repository. We are also working on a v4 version that adds support for streaming and other features. Please continue the discussion there: openai/openai-node#182.

@athyuttamre athyuttamre closed this Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants