{"repo":"agn-7/ifsguid-backend","free":true,"listed":false,"github":"https://github.com/agn-7/ifsguid-backend","clone":"git clone https://github.com/agn-7/ifsguid-backend.git","description":"Async AI Chat Application on top of FastAPI","language":"Python","stars":29,"topics":["docker","docker-compose","fastapi","nginx","poetry","pydantic","pydantic-v2","pytest","python","alembic"],"license":null,"category":"deployment-docker-iac","readme_excerpt":"IFSGuid Backend Async AI Chat Application Powered by gpt4free on top of FastAPI Setup It contains two generic entity models Interaction and Message. We store all of the data in the Postgres database. The interaction with the database is done with the SQLAlchemy library, and the simple GET and POST endpoints are exposed via the API, which is written with the FastAPI framework. To manage dependencies, we use poetry. To launch an API instance, you should: 1. Have a running Postgres instance, e.g. in a container. The application will read the .env file to access the database. 2. Create a virtual environment and install the dependencies in it. You can run poetry install for that. 3. Use start app.sh to run the server. By default, it will bind to http://localhost:8000. 4. An automatically generated documentation can be found at http://localhost:8000/docs. The endpoints are accessible at http://localhost:8000/api/ . You can also run the project via docker-compose (i.e. docker compose up -d ) on port 80 in which you would need the .docker.env containing the following variable to create the database: --- Here is a benchmark of the API using by wrk to demonstrate the performance of the service in different configuration: Service Loading Strategy WRK Configuration Throughput (reqs/sec) -------------- ------------------ --------------------- ----------------------- Async Joined 4 threads, 10 conns 132 Async Selectin 4 threads, 10 conns 112 Sync Lazy 4 threads, 10 conns 36 Sync Joined 4 t","default_branch":null,"files":null,"tree":[],"storefront":"/r/agn-7","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/agn-7/ifsguid-backend/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}