Interface AiChatService

All Known Implementing Classes:
AiChatDataService, AiChatEmptyService

public interface AiChatService
Generates assistant responses in an AI chat.

Whether a response can actually be produced depends on the application's AI configuration; callers should check isAvailable() before sending a message.

  • Method Details

    • processMessage

      String processMessage(AiChatMessage message)
      Generates the assistant's reply to the given user message.
      Parameters:
      message - the user message to answer
      Returns:
      the assistant's reply text, or an empty string if no reply was produced
    • processMessage

      String processMessage(AiChatMessage message, Consumer<AiToolStatusUpdate> statusCallback)
      Generates the assistant's reply to the given user message, reporting progress while the reply is being prepared.
      Parameters:
      message - the user message to answer
      statusCallback - receives progress updates during processing
      Returns:
      the assistant's reply text, or an empty string if no reply was produced
    • isAvailable

      boolean isAvailable()
      Returns whether AI chat is currently available, i.e. replies can be generated.
      Returns:
      true if chat is configured and ready to use