Gemini Proxy is a project that builds a chatbot connecting to Google Gemini via a backend proxy. Its goal is to manage conversation history, send requests to Gemini, and display responses to users via a web interface.
-
Technology: MariaDB
-
Function:
- Store conversation information, including chat history, messages, and related metadata.
- Support backend queries and management for sending requests to Gemini and returning results.
-
Technology: Spring Boot
-
Function:
- CRUD operations on conversations.
- Receive messages from the frontend.
- Retrieve conversation history from the database, call Google Gemini API, and return the results to the frontend.
- Manage sessions and user identification if needed.
-
Technology: React.js
-
Function:
- Build a Q&A interface with the chatbot.
- Send user input to the backend.
- Display Gemini’s responses and conversation history.
gemini-proxy/
├─ backend/ # Spring Boot backend
├─ frontend/ # React.js frontend
├─ database/ # Scripts, migrations, database.sql
└─ README.md
-
Database
- Install MariaDB.
- Import
database.sqlinto the database.
-
Backend
- Configure
application.propertiesfor database and other settings. - Run Spring Boot application (
mvn spring-boot:runor build jar).
- Configure
-
Frontend
- Install dependencies:
npm install - Run the app:
npm start
- Install dependencies:
-
Access
- Open browser at
http://localhost:<frontend-port>to interact with the chatbot.
- Open browser at
- Database: MariaDB
- Backend: Java 17, Spring Boot
- Frontend: React.js
- Testing: JUnit, JaCoCo
- Code Style: Checkstyle
Gemini Proxy là một dự án xây dựng chatbot kết nối tới Google Gemini thông qua backend proxy. Mục tiêu là quản lý lịch sử trò chuyện, gửi yêu cầu tới Gemini và hiển thị câu trả lời cho người dùng thông qua giao diện web.
-
Công nghệ: MariaDB
-
Chức năng:
- Lưu trữ thông tin cuộc trò chuyện, bao gồm lịch sử chat, tin nhắn và metadata liên quan.
- Hỗ trợ backend truy vấn và quản lý dữ liệu để gửi yêu cầu tới Gemini và trả kết quả về.
-
Công nghệ: Spring Boot
-
Chức năng:
- CRUD các cuộc trò chuyện.
- Nhận tin nhắn từ frontend.
- Lấy lịch sử trò chuyện từ database, gọi API Google Gemini, và trả kết quả về frontend.
- Quản lý session và định danh người dùng nếu cần.
-
Công nghệ: React.js
-
Chức năng:
- Xây dựng giao diện hỏi đáp với chatbot.
- Gửi yêu cầu từ người dùng tới backend.
- Hiển thị câu trả lời của Gemini và lịch sử trò chuyện.
gemini-proxy/
├─ backend/ # Spring Boot backend
├─ frontend/ # React.js frontend
├─ database/ # Scripts, migrations, database.sql
└─ README.md
-
Database
- Cài đặt MariaDB.
- Import file
database.sqlvào cơ sở dữ liệu.
-
Backend
- Cấu hình
application.propertiescho database và các tham số cần thiết. - Chạy ứng dụng Spring Boot (
mvn spring-boot:runhoặc build jar).
- Cấu hình
-
Frontend
- Cài đặt dependencies:
npm install - Chạy ứng dụng:
npm start
- Cài đặt dependencies:
-
Truy cập
- Mở trình duyệt tại
http://localhost:<frontend-port>để tương tác với chatbot.
- Mở trình duyệt tại
- Database: MariaDB
- Backend: Java 17, Spring Boot
- Frontend: React.js
- Kiểm thử: JUnit, JaCoCo
- Quản lý style code: Checkstyle