This project aims to practice building a chatbot in Kotlin
- Kotlin
- Spring Boot
- Spring AI
- GitHub models
- PostgreSQL
-
Setup GitHub models (free): Create your Fine-grained personal access tokens in GitHub https://github.com/settings/personal-access-tokens. The token needs to have models:read permissions.
-
Update the application.properties with your GitHub token
-
Choose AI Provider:
- GitHub Model: Setup GitHub models (free): Create your Fine-grained personal access tokens in GitHub https://github.com/settings/personal-access-tokens. The token needs to have models:read permissions.
- Google Gemini: Setup Gemini API: Create your API key in Google AI Studio https://aistudio.google.com/api-keys
-
Enable the base URL of your provider in application.properties
- GitHub Models:
spring.ai.openai.base-url=https://models.github.ai/inference - Google Gemini:
spring.ai.openai.chat.base-url=https://generativelanguage.googleapis.com
- GitHub Models:
-
Update the application.properties with your GitHub token or Gemini API key.
- Make sure Docker and Docker Compose are installed on your machine.
- Update the OPEN_API_KEY value in your .env file with your GitHub personal access token.
- Open a terminal of your choice, navigate to the ntg-jvm-agent directory, and run: docker compose up
Backend:
- Open the authorization-service project.
Start the application by running the class:Open mcp-server project, start application by running class:
- MCPServerApplication
- Open the mcp-server project.
Start the application by running the class:
- MCPServerApplication
- Open the orchestration-service project.
Update the property spring.ai.openai.api-key in application.properties with your GitHub token.
Start the application by running the class:
- OrchestratorApplication
FrontEnd
- Open chat-ui project, start application by running command:
- npm run build then
- npm run dev
- Open admin-ui project, start application by running command: npm run build then npm run dev
- npm run build then
- npm run dev
- PgAdmin: http://localhost:3560/ Account login: admin@ntg.com / admin. Register a server: postgres, port 5432, username admin, password admin.
- The Postgresql server: servername: localhost, port: 5432, username: admin, password: admin
- Grafana: http://localhost:3030/ Account login: admin / admin. Used to visualize metrics, logs, and traces from Prometheus, Loki, and Tempo.
- Prometheus: http://localhost:9090/ Used to collect and store metrics.
- Loki: http://localhost:3100/ Used to collect and store logs.
- Tempo: http://localhost:3200/ Used to collect and store traces.
- Give us a star
- Reporting a bug
- Participate discussions
- Propose new features
- Submit pull requests. If you are new to GitHub, consider to learn how to contribute to a project through forking
By contributing, you agree that your contributions will be licensed under MIT license.