Interface AIFileReceiver

All Superinterfaces:
Serializable

public interface AIFileReceiver extends Serializable
Interface for file upload components that are used in an AI conversation.
Since:
25.3
Author:
Vaadin Ltd
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns 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 returns true, the AIOrchestrator ignores prompts that would take the attachments from this receiver, so that the file is not left out of the prompt. The default implementation returns false.
      Returns:
      true if a file is being uploaded, false otherwise
      Since:
      25.3