From e52c8d4f78cdd72c0e8a18481e9f9b9cfbece336 Mon Sep 17 00:00:00 2001 From: xiangsx <1984871009@qq.com> Date: Fri, 5 May 2023 21:03:38 +0800 Subject: [PATCH] feat: use .env to store user profile --- .gitignore | 1 + README.md | 73 +++++++++++++++++++++++++-------------------- docker-compose.yaml | 8 ++--- 3 files changed, 45 insertions(+), 37 deletions(-) diff --git a/.gitignore b/.gitignore index 9ea894a..d095e4e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ yarn-error.log package-lock.json node_modules/ +.env \ No newline at end of file diff --git a/README.md b/README.md index b303387..8f73df7 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,47 @@ Have implemented models here: - [ ] bing.com/chat GPT-4/3.5 - [ ] italygpt.it GPT-3.5 + +## Run local + +```shell +# install module +yarn +# start server +yarn start +``` + +## Deploy with docker-compose + +first, you should create file .env +```env +http_proxy=http://host:port +# you should config this if you use forefront api, this apikey is used for receive register email +# get api key here https://rapidapi.com/Privatix/api/temp-mail +rapid_api_key=xxxxxxxxxx +``` +deploy +``` +docker-compose up --build -d +``` + +## Test with curl + +common request +```shell +curl "http://127.0.0.1:3000/ask?prompt=你好" +curl "http://127.0.0.1:3000/ask?prompt=你好&model=forefront" +``` + +request event-stream +```shell +# test you +curl "http://127.0.0.1:3000/ask/stream?prompt=你好" + +# test forefront +curl "http://127.0.0.1:3000/ask/stream?prompt=你好&model=forefront" +``` + Due to legal and personal issues, the development speed of this Repository may slow down over the next one to two weeks. I apologize for any inconvenience this may cause. I have been putting a lot of effort into this small personal/educational project, and it is now on the verge of being taken down.
You may join our discord: discord.gg/gpt4free for further updates.