Authenticate using your browser's cookies - no need to inconveniently copy and paste from your browser!
- <= Python 3.9
pip install revChatGPTAuth
from revChatGPTAuth import get_access_token
access_token = get_access_token('brave') # your browser
The following example codes are from the revChatGPT
README.
from revChatGPT.V1 import Chatbot
from revChatGPTAuth import get_access_token
chatbot = Chatbot(config={
"access_token": get_access_token('brave')
})
print("Chatbot: ")
prev_text = ""
for data in chatbot.ask(
"Hello world",
):
message = data["message"][len(prev_text) :]
print(message, end="", flush=True)
prev_text = data["message"]
print()
from revChatGPT.V1 import Chatbot
from revChatGPTAuth import get_access_token
chatbot = Chatbot(config={
"access_token": get_access_token('brave')
})
prompt = "how many beaches does portugal have?"
response = ""
for data in chatbot.ask(
prompt
):
response = data["message"]
print(response)