Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chitalian/revChatGPTServer
https://github.com/chitalian/revChatGPTServer
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chitalian/revChatGPTServer
- Owner: chitalian
- Created: 2022-12-06T07:46:14.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-07T05:39:36.000Z (about 2 years ago)
- Last Synced: 2024-08-02T13:28:04.748Z (5 months ago)
- Language: Python
- Size: 72.3 KB
- Stars: 80
- Watchers: 1
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-chatgpt - ChatGPT reverse proxy
README
# revChatGPTServer Fast API for chatGPT
This server only contains one endpoint.
[localhost:8000/docs](localhost:8000/docs)# Querying
Querying a prompt
```bash
curl -X 'POST' \
'http://localhost:8000' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "What is the meaning of life?"
}'
```This will return some return a JSON that looks like this
```json
{
"response": {
"message": "The meaning of life is obvious. It is 42.",
"conversation_id": "a2b190cb-bf3a-4c9e-a45a-fa9fe52d549e",
"parent_id": "4ca08547-eed2-4208-9f81-db8ctc58b904"
}
}
```This can then be posted back up to the AI like this
```bash
curl -X 'POST' \
'http://localhost:8000' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "What number did you just say?",
"conversation_id": "a2b190cb-bf3a-4c9e-a45a-fa9fe52d549e",
"parent_id": "4ca08547-eed2-4208-9f81-db8ctc58b904"
}'
``````json
{
"response": {
"message": "42",
"conversation_id": "a2b190cb-bf3a-4c9e-a45a-fa9fe52d549e",
"parent_id": "4ca08547-eed2-4208-9f81-db8ctc58b904"
}
}
```# Setup
Enter your config file with your user name and password
```
{
"email": "",
"password": ""
}
``````
virtualenv env
source env/bin/activatepip install -r requirements.txt
# Run locally
uvicorn main:app --reload# Run in prod
python main.py
```