ChatGPT
ChatGPT copied to clipboard
Use revChatGPT in headless linux server / hosted online app
I was not able to use revChatGPT in a hosted streamlit app (headless linux server), it only works in offline/local apps.
In hosted apps it seems to fail to open a new chrome window to log into the chatgppt session with error
local variable 'driver' referenced before assignment
deployed app: https://jaivus.streamlit.app/ repo: https://github.com/gustavz/jaivus
Is there a way to use revChatGPT in an online/hosted app, or is it only for offline/local usage?
I tried it with installing
chromium
chromium-driver
but that does not help
Use Xvfb
https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/743#issuecomment-1366847803
@gustavz You can also take a look at this. https://github.com/ahmetkca/chatgpt-unofficial-api-docker/tree/my-docker-novnc It might solve your problem. I designed this to be able to deploy to AWS.
@acheong08 I am using xvfb, here is the full packages list i use to host: https://github.com/gustavz/jaivus/blob/main/packages.txt
Official API just dropped yesterday. No more browsers needed
Please read README
nice! how do I use it, just pass my api key instead of the session key into Chatbot?
from revChatGPT.Official import Chatbot
There are some minor differences in API which you can find documented in the Wiki
Example usage:
https://github.com/acheong08/ChatGPT/blob/main/src/revChatGPT/Official.py#L347-L451
great, works for me now thanks!