A Template for Building AI Applications with Python (FastAPI) and TypeScript (ViteJs) using Groq as API
- Run the following in the terminal:
cp .env.example .env
- Find your Groq key here
- Replace the environment variable
GROQ_API_KEY
with the correct key - Restart the development server:
bash init-dev.sh
- Clone this repository
- Move to the project directory:
cd project-directory
- Initialize a virtual environment:
python -m venv venv
or
py -m venv venv
- Activate the virtual environment:
source venv/Scripts/activate
- Install the dependencies:
pip install -r requirements.txt
npm install
- Copy the
.env.example
file to.env
:
cp .env.example .env
-
Add your Groq API key to the
.env
file. Find your API key in your Groq account settings HERE. -
Start the application:
bash init-dev.sh
That's it! You can now access the application at http://localhost:8000 and customize it according to your needs.
The init-dev.sh
script will run both the backend and frontend servers concurrently.
In the future, I will update the repo with other useful scripts for deployment and more. Feel free to contribute and make AI accessible to everyone!