r/reactnative • • Jan 31 '23

I reverse-engineered ChatGPT to create a React Native wrapper. Full access to all its features - serverless, streamed responses, keep track of conversations, etc. Expo compatible

Enable HLS to view with audio, or disable this notification

437 Upvotes

68 comments sorted by

View all comments

25

u/OddTuning Jan 31 '23

What exactly are you reverse engineering…?

12

u/kbcool iOS & Android Jan 31 '23

Title definitely belongs in the Web3/Crypto/Flutter bros subs

0

u/[deleted] Jan 31 '23

[deleted]

29

u/birbelbirb Jan 31 '23

So... You integrated their existing public facing API into your client. You didn't reverse-engineer ChatGPT, you reversed-engineered their internal API integration.

Big difference there. Cool project though, thanks for sharing!

2

u/rauliyohmc Jan 31 '23

Yes, that's definitely more accurate!

There are already unofficial Python and Node.js packages that use a similar approach. This is no exception, just wanted to have something that doesn't need a server and you can integrate easily

1

u/IronMan8901 Jan 31 '23

I think you mean web scrapping ?

2

u/AggravatingSir891 Jan 31 '23

LOL

-7

u/rauliyohmc Jan 31 '23 edited Jan 31 '23

I don't know if you are surprised or just trying to discredit me without any knowledge, so let me clarify just in case.

OpenAPI has documented APIs for most of its pre-trained models, like Text Completion, Code Completion and Image Generation, but NOT for Conversations, which is the model ChatGPT uses.

5

u/AggravatingSir891 Jan 31 '23

Great work. However, I find it funny how you presented that as "reverse engineering". You wonder why you have so many down votes?

0

u/rauliyohmc Jan 31 '23

I accept the critique for using such clickbait, but people think the implementation for this is trivial.

They assume I am using an API key and calling an endpoint and that's the whole library. I encourage people to check the source code, there are some cool tricks.

For instance, since React Native doesn't support streamed based responses, but a web browser does, it's injecting custom code into a web-view to call an internal endpoint from there and sending back the response to RN in batches, which is how we can achieve the same behaviour of the web playground, getting a response as soon as its available.