GPTitor is an interactive sandbox that helps users learn to write effective prompts for Large Language Models (LLMs). Users can select tasks, write prompts, and receive feedback and grades from different LLMs to improve their skills.
The following GIF shows the key idea of GPTитор in practice:
- Open the GPTitor web application.
- Choose a task from the list provided.
- Write a prompt for the task and submit it.
- Review the feedback and grading based on the prompt evaluation criteria.
- Adjust the prompt based on feedback and resubmit to see improvements.
- Switch between different LLMs to practice and compare responses.
- Interactive chatbot interface.
- Task selection for targeted prompt writing practice.
- Prompt grading based on specific evaluation criteria.
- Feedback on areas for improvement.
- Option to switch between different LLMs for diverse practice.
- Node.js and npm installed.
- Python 3.9 installed.
- Clone the repository:
git clone https://gitlab.pg.innopolis.university/a.nasibullina/gptitor.git cd gptitor - Install frontend dependencies:
cd React npm install - Install backend dependencies:
cd ../API pip install -r requirements.txt
- Start the frontend application:
cd React npm start - Run the backend API using uvicorn:
cd ../API uvicorn Core.main:app --reload
- The service is currently available only within the Innopolis network.
- If you wish to deploy the service elsewhere, ensure to update links in the React config.ts file and API requests accordingly.
- You may access the API documentation (Swagger UI) at http://127.0.0.1:8000/docs in your web browser after the deployment.
- The public API documentation (Swagger UI) is available here.
- LLMs are hosted on remote servers; the API interacts with these servers.
- Frontend: React, CSS, TypeScript
- Build Tool: Vite
- Backend: FastAPI
- Database: SQLite
- Deployment: npm, Uvicorn
To simplify the development and deployment of your application, you can use Docker Compose. Below are the instructions on how to set up and run your application using Docker Compose.
Make sure you have Docker and Docker Compose installed on your machine. You can download them from the official Docker website.
-
Clone the Repository
git clone https://gitlab.pg.innopolis.university/a.nasibullina/gptitor.git cd gptitor -
Build and Run Containers
Navigate to the root directory of your project where
docker-compose.ymlis located and run the following command:docker-compose up --build
This command will build the Docker images for the backend and frontend services and start the containers.
-
Access the Application
- The backend will be accessible at
http://localhost:8000 - The frontend will be accessible at
http://localhost:5173
- The backend will be accessible at
-
Stopping the Containers
To stop the containers, press
CTRL+Cin the terminal wheredocker-compose upis running or use the following command:docker-compose down
To automate the build, test, and deployment process, you can use GitLab CI/CD. The following guidance is applicaple only for the Innopolis University community. Below are the instructions to set up the GitLab CI/CD pipeline.
- Ensure you have access to the Innopolis University GitLab instance.
- Make sure you have the necessary credentials to work in Innopolis University DevOps Playground.
The CI/CD pipeline configuration is specified in the .gitlab-ci.yml file. This configuration includes the following stages:
- Build Stage: Builds the Docker images for the backend and frontend services.
- Lint Stage: Runs linting tools ESLint and Flake8 for the frontend and backend code.
- Test Stage: Runs tests for the frontend and backend code using Jest and Pytest respectively.
- Deploy Stage: Contains commands for deploying the application. You need to customize this according to the deployment strategy (e.g., deploying to a cloud provider, Kubernetes, etc.).
To start the CI pipeline, refer to the tutorial shared in the Innopolis University GitLab repository here.
- Ensure all required environment variables are set correctly in your GitLab CI/CD settings.
- This pipeline is configured to work specifically for the Innopolis University environment.
For more comprehensive details on the API, DB, and React components structure, please refer to the following documents:
-
API Documentation: This document provides detailed information about the API endpoints, data formats, database structure, and usage instructions.
-
React Components Documentation: Here you can find comprehensive descriptions for the React components implemented in this project.
Alternatively, you can visit the GitLab Wiki Home Page created for simplified orientation through the detailed documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions, issues, or contributions, you can reach out to the developers:
-
Alexandra Starikova-Nasibullina
- Email: a.nasibullina@innopolis.university
- Telegram: @lexandrinnn_t
-
Makar Dyachenko
- Email: m.dyachenko@innopolis.university
- Telegram: @index099
-
Anas Hamrouni
- Email: a.hamrouni@innopolis.university
- Telegram: @reachnasta
-
Ahmed Baha Eddine Alimi
- Email: a.alimi@innopolis.university
- Telegram: @Allimi3
-
Ildar Rakiev
- Email: i.rakiev@innopolis.university
- Telegram: @mescudiway
