Important
THIS REPOSITORY IS NOT UNDER ACTIVE DEVELOPMENT!
This project is an AI model wrapper developed for the Bilkent University CTIS221 - Object-Oriented Programming course. It provides a modular and extensible framework for integrating and managing various AI models, including support for chat, embeddings, and other capabilities.
- Modular Architecture: Built with Spring Modulith for modularity and scalability.
- Database Integration: Uses PostgreSQL for persistent storage.
- Caching: Redis is used for caching frequently accessed data.
- Streaming Support: Real-time streaming capabilities using WebFlux and test streaming with Hono.
- AI Model Integration: Supports integration with various AI models and providers.
- Java 17 or higher
- Gradle (for building the backend service)
- Docker (for running PostgreSQL, Redis, and other services)
- Bun (for the
stream-hono
service)
-
Clone the repository:
git clone https://github.com/sezrr/ctis221-project.git cd ctis221-project/projects/llm-chat-service
-
Start the required services using Docker Compose:
docker-compose -f compose.yaml up -d
-
Build and run the Spring Boot application:
./gradlew bootRun
-
Access the application at
http://localhost:8080
.
-
Navigate to the
stream-hono
directory:cd ctis221-project/projects/stream-hono
-
Install dependencies:
bun install
-
Start the development server:
bun run dev
-
Open
http://localhost:3000
in your browser.
- Add instructions for running the JavaFX GUI.
The API documentation is available at:
-
http://localhost:8080/swagger-ui.html
for the backend services. -
MORE DOCUMENTATION
The project uses a monorepo style structure with the following projects:
llm-chat-service
: Spring Boot Modular Monolith Backend service for managing AI models, users, chats and their configurations.aimodel
: AI model management module.chat
: Chat module for interacting with AI models, and CRUD operations for chat history.authentication
: User authentication and authorization module.instruction
: Instruction module for managing instructions.tiering
: Tiering module for managing user tiers.shared
: Shared module for common utilities and configurations.
stream-hono
: Backend service for real-time streaming and interaction.modulo-ai
: Core library for AI model integration and provider management.javafx-gui
: JavaFX GUI for interacting with the backend services.
- Spring Boot: Backend framework.
- PostgreSQL: Database.
- Redis: Caching.
- Hono: Real-time streaming.
- Bun: JavaScript runtime for the frontend.
- Docker: Containerization.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push them to your fork.
- Submit a pull request.