FrancescoCoding / easyGPT

🤖 Template for a Node.js server (complete of npm module!) that sends requests to the ChatGPT API to generate responses for your chatbot.
https://easygpt.dev/
MIT License
21 stars 6 forks source link

Eliminating axios dependency and adds further example #4

Closed IllogicalTree closed 1 year ago

IllogicalTree commented 1 year ago

Hey guys awesome project, really liked the use of the builder pattern! Doubt if yous were expecting any external pull requests but.. surprise!

In short, I thought it might be better to reduce the number of external dependencies in favour of the built in fetch api, this can be seen in the npm package and express server example. I found it a bit strange that yous weren't making use of the wrapper library in your own express server example, hence that addition. All functionality should remain identical.

Appreciate you perhaps weren't looking for contributions, so no hard feelings if this is rejected :)

AdamGovier commented 1 year ago

Thanks Jordan! Good point on reducing dependencies. Fetch is new to node. I'm aware that it's been in the browser a long while just forgotten that it has been added to node. I will ask @FrancescoCoding to merge. Cheers!

AdamGovier commented 1 year ago

Also @FrancescoCoding worked on the express server before I made the module, so that was a great idea to apply the module to the original project. Thanks very much!

FrancescoCoding commented 1 year ago

Hi @IllogicalTree thank you for your PR! May I ask you to create a new branch for this so I can pull it to test all the changes? 😎

Actually nevermind @IllogicalTree I can just pull the PR as a branch, didn't know that! I'll get back to you once I'm done reviewing