Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions articles/building-apps/ai/quickstart-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ page-title: Quick Start-Guide | AI Chatbot with Vaadin
description: A compact chat view with streaming, correct scrolling, and message context.
meta-description: Hands-on tutorial - connect Vaadin to an LLM with Spring, build a streaming chat UI, and apply simple, reusable patterns for prompts, memory, and UX.
order: 20
section-nav: badge-preview
---
= [since:com.vaadin:vaadin@V25.1]#Quick Start-Guide: Add an AI Chat Bot to a Vaadin + Spring Boot Application#

:preview-feature: AI integration features
:feature-flag: com.vaadin.experimental.aiComponents
include::{articles}/_preview-banner.adoc[opts=optional]

This guide shows how to connect your Spring Boot application to a Large Language Model (LLM) using Spring AI. Vaadin's <<{articles}/flow/ai-support#,AI integration features>> then connect the model to the UI. You'll build a minimal chat UI with **MessageList** and **MessageInput**, stream responses token-by-token, and keep a conversational tone in the dialog with the AI -- all without writing boilerplate wiring code.

image::images/chatbot-image.png[role=text-center]
Expand All @@ -22,7 +17,6 @@ image::images/chatbot-image.png[role=text-center]
== Prerequisites

* An OpenAI API key (`OPENAI_API_KEY`)
* The `com.vaadin.experimental.aiComponents` feature flag enabled, as the AI integration features are still a preview. Enable it in Copilot's experimental features tab, or add `com.vaadin.experimental.aiComponents=true` to `src/main/resources/vaadin-featureflags.properties`. Without it, the first prompt fails.


== 1. Start from a Vaadin Spring Skeleton
Expand Down Expand Up @@ -183,7 +177,7 @@ Start the application, open the browser, and try your first prompts.

== What You Built

* A working **chat bot** using Vaadin's AI integration features, which are still a preview
* A working **chat bot** using Vaadin's AI integration features
* **Token-by-token streaming** with Vaadin Push
* **Conversation memory** managed by the LLM provider

Expand Down
36 changes: 0 additions & 36 deletions articles/building-apps/testing/browserless/test-ai-views.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@ page-title: Test AI-Powered Views | Vaadin
description: Replace the LLM with a scripted provider, drive the chat with testers, and start a Spring AI application without a real model.
meta-description: Test Vaadin views built with the AI Orchestrator in browserless tests using a scripted LLM provider, and run Spring AI tests without a real model or API key.
order: 95
section-nav: badge-preview
---


= Test AI-Powered Views

:preview-feature: AI integration features
:feature-flag: com.vaadin.experimental.aiComponents
include::{articles}/_preview-banner.adoc[opts=optional]

A view built with the <<{articles}/flow/ai-support#,AI Orchestrator>> sends each prompt to an LLM provider.
A browserless test replaces that provider with a scripted one.
The scripted provider answers at once, the same way on every run, and without any cost.
Expand All @@ -24,37 +19,6 @@ The examples use the plain Java setup, and test the chat as a single component,
To test a whole view in a Spring Boot application, see <<#spring-boot,Test the View with Spring Boot>>.


== Enable the Feature Flag

The AI integration features are a preview.
Unless their feature flag is enabled, the orchestrator throws an [classname]`AiComponentsExperimentalFeatureException` on the first prompt.
In a test, that's the call that sends the message.

Browserless tests read the flag from the same [filename]`src/main/resources/vaadin-featureflags.properties` file as the application, so a project that enables the flag there needs nothing more.

To enable the flag for the tests alone, [since:com.vaadin:vaadin@V25.4]#pass a configuration with the `aiComponents` feature to [methodname]`forComponent()`#, which the tests on this page use to create the window:

[source,java]
----
var configuration = BrowserlessConfiguration.builder()
.withFeatureFlags("aiComponents")
.build();
window = BrowserlessUIContext.forComponent(configuration,
() -> new SupportChat(provider, orderTools));
----

In the <<#spring-boot,Spring Boot test>>, enable it on the builder of the browserless application context bean instead:

[source,java]
----
return SpringBrowserlessApplicationContext.create(applicationContext,
builder -> builder.withViewPackages(Application.class)
.withFeatureFlags("aiComponents"));
----

See <<{articles}/flow/testing/browserless/test-configuration#configuring-without-annotations,Configuring without Annotations>> for the other forms.


== Pass the Provider to the Chat

Build the orchestrator in a component that takes the provider as a constructor argument.
Expand Down
7 changes: 0 additions & 7 deletions articles/components/message-list/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ You can listen for attachment click events to handle downloads or other actions.
[role="since:com.vaadin:vaadin@V25.3"]
== Typing Indicator [badge-flow]#Flow#

:preview-feature: the Message List typing indicator
:feature-flag: com.vaadin.experimental.messageListTypingIndicator
:ticket-url: https://github.com/vaadin/flow-components/issues/new/choose
include::{articles}/_preview-banner.adoc[opts=optional]

Message List can show which users are typing, for example to tell the participants of a chat that a reply is on its way. The typing indicator appears after the last message. By default, it shows the avatars and names of the typing users, and the text _Typing…_. If the list is scrolled to the end when the indicator appears, the list scrolls to keep the indicator in view.

[.example,themes="lumo,aura"]
Expand All @@ -133,8 +128,6 @@ include::{root}/src/main/java/com/vaadin/demo/component/messages/MessageListTypi

Set the typing users with [methodname]`setTypingUsers()`. Each call replaces the current typing users, and a call without users hides the indicator. Message List doesn't remove the users on its own, so update them when someone stops typing or sends a message. [methodname]`getTypingUsers()` returns the current users, for example to filter out the one who stopped.

Without the feature flag, the methods that configure the typing indicator throw a [classname]`MessageListTypingIndicatorExperimentalFeatureException`, at the latest when the list is attached. The `aiComponents` flag of the <<{articles}/flow/ai-support#,AI support features>> enables the typing indicator as well.

Each typing user is a [classname]`MessageListUser`. Like the sender of a message, it has a name, an abbreviation, an image, and a color index for the avatar, and class names added with [methodname]`addClassNames()` apply to the avatar. Changing any of these updates the indicator right away. The image is either a URL set with [methodname]`setImage()`, or a [classname]`DownloadHandler` set with [methodname]`setImageHandler()`, which Message List serves as a resource. Since the resource is registered for the list that the user was last added to, use a separate [classname]`MessageListUser` instance for each list.

Message List hides the typing indicator from assistive technologies and keeps it out of the focus order. Instead, it announces the names of the typing users and the typing indicator text through a live region.
Expand Down
6 changes: 0 additions & 6 deletions articles/flow/ai-support/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: AI Integration
description: Vaadin provides UI interfaces and an AI orchestrator for building AI-powered UIs with Vaadin, handling streaming, history, attachments, and tool calling.
meta-description: Use Vaadin AI integration features to build AI-powered interfaces by connecting Message List, Message Input, and Upload components to Spring AI or LangChain4j.
section-nav: badge-preview
order: 213
page-links:
- 'API: https://vaadin.com/api/platform/{moduleMavenVersion:com.vaadin:vaadin}/com/vaadin/flow/component/ai/orchestrator/AiOrchestrator.html[Java]'
Expand All @@ -16,11 +15,6 @@ page-links:
Vaadin provides a set of UI interfaces and a coordination engine for building AI-powered UIs. The [classname]`AiOrchestrator` wires UI components to an LLM provider, handling streaming responses, conversation history, file attachments, and tool calling behind a simple builder API.
// end::description[]

:preview-feature: AI integration features
:feature-flag: com.vaadin.experimental.aiComponents
:ticket-url: https://github.com/vaadin/flow-components/issues/new/choose
include::{articles}/_preview-banner.adoc[opts=optional]


== Overview

Expand Down
9 changes: 7 additions & 2 deletions articles/upgrading/25-3-to-25-4.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,15 @@ The `i18n` property of web components, such as Date Picker and Upload, is `undef
Grid cells::
Grid renders its body cells with Lit. Body cells no longer have generated `id` attributes. With lazy column rendering, the content of columns scrolled out of view is removed from the DOM, and overlays opened from it close and reopen. Subclasses of the `vaadin-grid` web component can't use the removed protected members `_detailsCells`, `_configureDetailsCell()`, `_updateFirstAndLastColumnForRow()`, and `_generateCellPartNames()`.

Message List typing indicator::
The <<{articles}/components/message-list#typing-indicator,typing indicator>> of Message List is no longer a preview feature, and its `com.vaadin.experimental.messageListTypingIndicator` feature flag is removed. Remove the flag from the [filename]`vaadin-featureflags.properties` file.

== AI Integration (Preview)

The AI integration is still a preview feature, behind the `com.vaadin.experimental.aiComponents` feature flag, and Vaadin 25.4 renames its classes and interfaces. `AI` and `LLM` in a type name are now written as `Ai` and `Llm`, also in nested types. For example, [classname]`AIOrchestrator` is now [classname]`AiOrchestrator`, [interfacename]`LLMProvider.LLMRequest` is [interfacename]`LlmProvider.LlmRequest`, and [classname]`SpringAILLMProvider` is [classname]`SpringAiLlmProvider`. [classname]`LangChain4JLLMProvider` is now [classname]`LangChain4jLlmProvider`, with a lowercase `j`.
== AI Integration

The AI integration is no longer a preview feature, and its `com.vaadin.experimental.aiComponents` feature flag is removed. Remove the flag from the [filename]`vaadin-featureflags.properties` file, where it now only causes a warning in the log. Remove it from the configuration of browserless tests as well. A test that enables a flag that doesn't exist fails with a [classname]`BrowserlessTestSetupException`.

Vaadin 25.4 also renames the classes and interfaces of the AI integration. `AI` and `LLM` in a type name are now written as `Ai` and `Llm`, also in nested types. For example, [classname]`AIOrchestrator` is now [classname]`AiOrchestrator`, [interfacename]`LLMProvider.LLMRequest` is [interfacename]`LlmProvider.LlmRequest`, and [classname]`SpringAILLMProvider` is [classname]`SpringAiLlmProvider`. [classname]`LangChain4JLLMProvider` is now [classname]`LangChain4jLlmProvider`, with a lowercase `j`.

In addition, [interfacename]`DatabaseProvider` is now [interfacename]`QueryExecutor`, and [classname]`DatabaseProviderAITools` is [classname]`QueryExecutorAiTools`.

Expand Down
Loading