Package com.vaadin.flow.component.ai.ui
Interface AIFileReceiver
- All Superinterfaces:
Serializable
Interface for file upload components that are used in an AI conversation.
- Since:
- 25.3
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturns whether a file is still being uploaded to this receiver.Returns all accumulated attachments and clears the internal state.
-
Method Details
-
takeAttachments
List<AIAttachment> takeAttachments()Returns all accumulated attachments and clears the internal state.After this method returns, the receiver is ready to accept new files. The UI file list is also cleared.
- Returns:
- an unmodifiable list of attachments, or an empty list if none are pending
-
isUploading
default boolean isUploading()Returns whether a file is still being uploaded to this receiver. While this returnstrue, theAIOrchestratorignores prompts that would take the attachments from this receiver, so that the file is not left out of the prompt. The default implementation returnsfalse.- Returns:
trueif a file is being uploaded,falseotherwise- Since:
- 25.3
-