Class SwingFunctionPrompter

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, FunctionPrompter

public class SwingFunctionPrompter extends JDialog implements FunctionPrompter
A combined JDialog and FunctionPrompter implementation for Swing.
Author:
anahata
See Also:
  • Constructor Details

    • SwingFunctionPrompter

      public SwingFunctionPrompter(ChatPanel chatPanel)
  • Method Details

    • prompt

      public FunctionPrompter.PromptResult prompt(ChatMessage modelMessage, Chat chat)
      Description copied from interface: FunctionPrompter
      Prompts the user to confirm a list of function calls from the model's response.

      This method is responsible for displaying the proposed calls and their arguments to the user and collecting their approval or denial for each.

      Specified by:
      prompt in interface FunctionPrompter
      Parameters:
      modelMessage - The full ChatMessage from the model, containing one or more function calls.
      chat - The current Chat instance, providing access to context and configuration.
      Returns:
      A FunctionPrompter.PromptResult object containing the user's choices and comments.