Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

Code examples

Antonio Cheong edited this page Mar 10, 2023 · 3 revisions

Simple CLI ChatGPT python code

from revChatGPT.V1 import Chatbot

chatbot = Chatbot(config={
    "email": "email",
    "password": "your password"
})


def start_chat():
    print('Welcome to ChatGPT CLI')
    while True:
        prompt = input('> ')

        response = ""

        for data in chatbot.ask(
                prompt
        ):
            response = data["message"]

        print(response)


if __name__ == "__main__":
    start_chat()

Clone this wiki locally