AI-Assistant is a virtual assistant powered by artificial intelligence. It can generate embeddings from the uploaded files (datasets) to perform semantic searches and answer user questions based on those files.
How it works:
cd backend
python -m venv venv
.\venv\Scripts\Activate.ps1
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload
The backend will be available in http://127.0.0.1:8000
1.- Enter the frontend directory:
cd frontend
2.- Install dependencies:
npm install
3.- Run the server:
npm run dev
The frontend will be available in http://localhost:3000.
mysql -u <user> -p database/init.sql
mysql -u <user> database/seed.sql
example.env and rename it to .env# AI API key (OpenAI or Hugging Face)
API_KEY=<your_api_key>
# MySQL database configuration
DB_USER=<your_mysql_user>
DB_PASSWORD=<your_mysql_password>
DB_HOST=localhost
DB_PORT=3306
DB_NAME=ai_assistant
[!NOTE]
- OpenAI priority: If the API key is for OpenAI, the assistant will use OpenAI’s models first.
- Hugging Face fallback: If OpenAI fails (invalid or missing key), the assistant will automatically try Hugging Face models.
- Default model:
meta-llama/Llama-3.1-8B-Instruct:cerebrasis the default selected model to Hugging Face. You can try other models: visit Hugging Face Models to explore the available models.- You only need one API key—either OpenAI or Hugging Face. No extra configuration is required.
This project is licensed under the MIT License. See the LICENSE file for details.
84 commits
TypeScript
42.6%
Python
34.1%
SCSS
18.3%
JavaScript
4.4%
AI-Assistant is a virtual assistant powered by artificial intelligence. It can generate embeddings from the uploaded files (datasets) to perform semantic searches and answer user questions based on those files.
How it works:
cd backend
python -m venv venv
.\venv\Scripts\Activate.ps1
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload
The backend will be available in http://127.0.0.1:8000
1.- Enter the frontend directory:
cd frontend
2.- Install dependencies:
npm install
3.- Run the server:
npm run dev
The frontend will be available in http://localhost:3000.
mysql -u <user> -p database/init.sql
mysql -u <user> database/seed.sql
example.env and rename it to .env# AI API key (OpenAI or Hugging Face)
API_KEY=<your_api_key>
# MySQL database configuration
DB_USER=<your_mysql_user>
DB_PASSWORD=<your_mysql_password>
DB_HOST=localhost
DB_PORT=3306
DB_NAME=ai_assistant
[!NOTE]
- OpenAI priority: If the API key is for OpenAI, the assistant will use OpenAI’s models first.
- Hugging Face fallback: If OpenAI fails (invalid or missing key), the assistant will automatically try Hugging Face models.
- Default model:
meta-llama/Llama-3.1-8B-Instruct:cerebrasis the default selected model to Hugging Face. You can try other models: visit Hugging Face Models to explore the available models.- You only need one API key—either OpenAI or Hugging Face. No extra configuration is required.
This project is licensed under the MIT License. See the LICENSE file for details.
84 commits
TypeScript
42.6%
Python
34.1%
SCSS
18.3%
JavaScript
4.4%