Interface FunctionPrompter

All Known Implementing Classes:
SwingFunctionPrompter

public interface FunctionPrompter
An interface for UI components that can prompt the user to confirm a batch of function calls.

This decouples the core function-calling logic from any specific UI implementation (e.g., Swing, command-line), allowing the framework to be embedded in different environments.

Author:
anahata
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A value object holding the results of a user confirmation prompt.
  • Method Summary

    Modifier and Type
    Method
    Description
    prompt(ChatMessage modelMessage, Chat chat)
    Prompts the user to confirm a list of function calls from the model's response.
  • Method Details

    • prompt

      FunctionPrompter.PromptResult prompt(ChatMessage modelMessage, Chat chat)
      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.

      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.