A FastAPI-based application that provides code assistance using Retrieval-Augmented Generation (RAG) technology.
- Web-based code assistant interface
- FastAPI backend with API documentation
- RAG-powered code suggestions and assistance
- Python 3.8+
- pip (Python package manager)
-
Clone the repository:
git clone https://github.com/yourusername/code-assistant.git cd code-assistant -
Set up a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory (optional):# Example environment variables PORT=8000 HOST=0.0.0.0 WORKERS=1
Run the application:
python run.pyThe server will start at http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Frontend Interface: http://localhost:8000/app
- Health Check: http://localhost:8000/health
code-assistant/
├── app/ # Application directory
│ ├── api/ # API routes
│ ├── frontend/ # Frontend application
│ ├── schemas/ # Pydantic models
│ ├── services/ # Business logic
│ ├── tasks/ # Background tasks
│ └── main.py # FastAPI application initialization
├── venv/ # Virtual environment
├── .env # Environment variables (create this)
├── .gitignore # Git ignore file
├── README.md # This file
├── requirements.txt # Python dependencies
└── run.py # Application entry point
[Your License Here]
Contributions are welcome! Please feel free to submit a Pull Request.