FastAPI + OpenAI + Websocket - chat example
- first of all, check if you already copied .env from .env.dist file
cp .env.dist .env
- update your openAI api secret key in it
- build and start docker-compose
docker-compose up -d --build
- To check if server is running go to:
- To check if frontend is running go to:
- put your files to directory ./server/docs
- run this command:
docker exec -it chat_api bash -c "python chat_model.py"
- restart chat_api container
docker exec -it chat_api bash -c "python -m pytest"
docker exec -it chat_api bash -c "mypy src tests"
docker exec -it chat_api bash -c "flake8 src tests"