Chat memory with LangChain4j and Ollama
This example shows how a bounded message window carries conversational state across turns.
The first call states a fact, and the second one relies on the memory window to recall it.
Requirements
Steps for running this example in the shell
- Start Ollama and pull the model:
bash
ollama serve
ollama pull llama3.2:1b- Run the application:
bash
mvn compile exec:javaOutput
Nice to meet you, Boni.
Your name is Boni.