This project delivers an AI-powered assistant designed to aid in various tasks, such as code review, document analysis, and interactive queries. The assistant utilizes a language model from Ollama, allowing you to interact with it based on your input. The project defaults to using the "codellama" model from Ollama's extensive model library, but you are encouraged to explore and utilize other models available at the Ollama website.
Stay informed about the latest updates by checking our changelog here.
Ensure you meet the following requirements before setting up the AI Assistant:
- Python 3.11.8 or earlier (compatibility issues exist with newer versions due to Torch dependencies).
- A virtual environment, ideally managed via
venvor a similar tool, to manage Python packages without conflicts. - Installation of additional Python packages as specified in the
requirements.txtfile. - Active Ollama background service, necessary for the model functionalities.
Follow these steps to get started with the AI Assistant:
-
Clone the Repository:
git clone https://github.com/mmalloul/ai-assistant.git cd ai-assistant -
Model Setup:
- Download your desired Ollama model from the Ollama website.
- For the codellama model:
ollama pull codellama
-
Environment Setup:
python -m venv env source env/bin/activate # For Linux/Mac env\Scripts\activate # For Windows
-
Install Dependencies:
pip install -r requirements.txt
Modify settings in the config.py file as needed:
BACKEND_URL: LLM Backend Micro Service
Launch streamlit frontend using the following command:
cd streamlit
streamlit run app.pyLaunch the backend using the following command:
cd .. # if you are not in the root of the project
cd backend
python -m app.main