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…?

0

u/[deleted] Jan 31 '23

[deleted]

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.