ayushgml / chatgpt-terminal-test

This is a headless chrome based API that can run on your localhost and you can test via terminal, Thunderclient, Postman etc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chatgpt-terminal-test

This is a headless chrome based API that can run on your localhost and you can test via terminal, Thunderclient, Postman etc

This repository has been inspired by whatsapp-gpt by Daniel Gross

How to run:

git clone https://github.com/ayushgml/chatgpt-terminal-test.git
cd chatgpt-terminal-test
virtualenv pyenv
source pyenv/bin/activate
pip install -r requirements.txt
python server.py

Now in your terminal you can paste this sample curl request (or you can create your own):

curl -XGET http://localhost:5001/chat\?q\=i%20am%20having%20an%20exam%20tomorrow%20Any%20advice\?

The result should be like this:

chatgpt-ss

Note: the server.py code uses a sleep time for 15 seconds. So the content that can be processed by the chatGPT in 15 seconds can be seen in the terminal. Response message till 15 seconds will be recorded.

Although you can increase/decrease the sleep time on line number 40 of server.py code.

About

This is a headless chrome based API that can run on your localhost and you can test via terminal, Thunderclient, Postman etc


Languages

Language:Python 100.0%