This project is a chatbot for Sugar Labs using the Gemini API. The chatbot interacts with users who are willing to contribute to Sugar Labs by providing information from the Sugar Labs documentation.
- Python 3.8 or higher
- Node.js 14 or higher
- npm or yarn
- Virtual environment (optional but recommended)
- Docker
Pull the Docker image from Docker Hub / Github:
docker pull mostlyk/sugar-docs-ai:latest
docker pull ghcr.io/mostlykiguess/sugar-docs-ai:latest
docker run -p 5000:5000 -p 8501:8501 --name containedlocal_app mostlyk/sugar-docs-ai:latest
- Streamlit UI: Open your browser and navigate to http://localhost:8501
- Flask API: Accessible at http://localhost:5000/api/chatbot
-
Clone the repository:
git clone https://github.com/your-username/sugar-labs-chatbot.git cd sugar-labs-chatbot
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required Python packages:
pip install -r requirements.txt
-
Set up environment variables:
Create a .env file in the root directory and add your Gemini API key:
GEMINI_API_KEY=your_gemini_api_key
-
Run the Flask server:
python server.py
The server will start on
http://localhost:5000
.
-
Navigate to the frontend directory:
cd sugar-docs-frontend-ai
-
Install the required Node.js packages:
npm install
-
Set up environment variables:
Create a .env.local file in the sugar-docs-frontend-ai directory and add the backend URL:
NEXT_PUBLIC_API_URL=http://localhost:5000/api/chatbot
-
Run the Next.js development server:
npm run dev
The frontend app will start on
http://localhost:3000
.
-
Start the backend server:
python server.py
-
Start the frontend app:
cd sugar-docs-frontend-ai npm run dev
-
Open your browser and navigate to
http://localhost:3000
to interact with the chatbot.
-
Run the Streamlit app:
streamlit run streamlit.py
-
Open your browser and navigate to the URL provided by Streamlit (e.g.,
http://localhost:8501
) to interact with the chatbot.
-
Run the Streamlit app:
streamlit run containedlocal.py
-
Open your browser and navigate to the URL provided by Streamlit (e.g.,
http://localhost:8501
) to interact with the chatbot.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License.