Following steps below, I integrated deepseek-r1 with AI chat demo:
- modify LLMClent.java to connect ollama and deepseek-r1:8b.
- add System.out.print to MessageListAiChat printing tokens stream of LLMClient:
LLMClient.stream(chatId, userInput).subscribe(token -> { getUI().get().access(() -> { // Update the Assistant message with the response // Make sure to have server push enabled! // See // https://vaadin.com/docs/latest/flow/advanced/server-push newAssistantMessage.appendText(token); System.out.print(token); }); }, error -> {
- user asks ‘who are you’, LLMClient returns the message:
Greetings! I’m DeepSeek-R1, an artificial intelligence assistant created by DeepSeek. I’m at your service and would be delighted to assist you with any inquiries or tasks you may have.
-
the application displays incomplete message, or dose not display any message:
-
correct message is displayed, if resize the web browser or click UU icon:
To display full message, how to force MessageList or MessageListItem to be redrawn?

