https://github.com/xkondix/aisandbox-java-spirng
Spring connection with LLMs
https://github.com/xkondix/aisandbox-java-spirng
chatmemory chroma gemma3 gpt java langchain4j llama3 llm ollama rag redis spring-boot
Last synced: 3 months ago
JSON representation
Spring connection with LLMs
- Host: GitHub
- URL: https://github.com/xkondix/aisandbox-java-spirng
- Owner: xkondix
- Created: 2025-06-22T10:40:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-07T20:47:54.000Z (12 months ago)
- Last Synced: 2025-07-08T00:18:49.335Z (12 months ago)
- Topics: chatmemory, chroma, gemma3, gpt, java, langchain4j, llama3, llm, ollama, rag, redis, spring-boot
- Language: Java
- Homepage:
- Size: 2.43 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aiSandbox-JAVA-SPIRNG
# ๐ค Local AI Assistant with LangChain4j, Ollama & Spring Boot
This project demonstrates how to build a **local AI-powered assistant** using `LangChain4j`, `Spring Boot`, and `Ollama`, enabling tool-calling, Retrieval-Augmented Generation (RAG), chat memory, Redis.
Postman collection version 2.1 available in assets folder.
---
## ๐ฅ Features
- ๐ง **Local LLMs** (e.g., Gemma 3B, LLaMA 3.1 8B) with Ollama
- ๐ฅ **RAG with ChromaDB**: Local document embedding and retrieval
- ๐งฐ **@Tool Integration**: Math calculator, Artist file writer
- ๐ **Custom metadata injection** for enhanced prompt building
- ๐งพ **Redis-based chat memory**
---
## ๐ง Local LLM Setup with Ollama
To run this project locally with large language models:
```bash
docker compose up -d
docker exec -it ollama bash
ollama pull gemma3:4b
ollama pull llama3.1:8b
```

---
## Tech Stack
- **Spring Boot 3.5.3**
- **JAVA 21**
- **LangChain4j**
- **Ollama**: for local models
- **Redis**: chat memory
- **Chroma**: document RAG vector DB
- **Docker Compose**
---
## Useful pages
**Github**
- https://github.com/langchain4j/langchain4j-examples/ `(spring boot)`
- https://github.com/cescoffier/langchain4j-deep-dive/ `(quarkus)`
**Page**
- https://docs.langchain4j.dev/ `(official documentation)`