pip install -U chatgpt
⚠️ Please, update the library. Note the change in the config file.
Create the file config.json in your working directory:
{
"email": "email@example.org",
"password": "xxx"
}You can launch the CLI with:
chatgptor
python -m chatgptThese are the available commands:
reset: forget the context of the current conversation.clear: clear the terminal.exit: exit the CLI.
from chatgpt import Conversation
conversation = Conversation()
print(
conversation.chat(
"We are going to start a conversation. "
"I will speak English and you will speak Portuguese."
)
)
print(conversation.chat("What's the color of the sky?"))
# The AI will forget it was speaking Portuguese
conversation.reset()
print(conversation.chat("What's the color of the sun?"))