Skip to content

kirillsurkov/chatgpt_bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chatgpt_bridge

Bridge to the ChatGPT via Selenium

How to use

First of all you should create .env file. You can see required variables in env.sample

Then run the bridge with uvicorn. Example:

cd bridge
uvicorn openai_bridge:fast_api --port 8001

After that you'll be able to open page http://127.0.0.1/docs and play with API. Currently there is 3 endpoints that you can use.


/ask

POST

Request format:

{
        "question": "your question here"
}

Response format:

"network answer here"

/refresh_thread

POST

Request body is empty.

Response body is empty.


/is_thread_new

GET

Request body is empty.

Response format:

true

You can see example usage of this API in the tg_bot directory.

This project was made just for fun, so the code may not be perfect. Any suggestions are welcome!

About

Bridge to the ChatGPT via Selenium

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages