Interface IPrompting

All Known Subinterfaces:
IPromptingWithTools
All Known Implementing Classes:
PromptingBase, PromptingChatGPT, PromptingChatGPTResponsesAPI, PromptingOllama, PromptingOllamyByChromaDB, PromptingWithToolsBase

public interface IPrompting
Interface to prompting functionality.

This interface is used by prompting controls on UI level to talk to a prompting system.
  • Method Details

    • addMessage

      void addMessage(PromptingMessage message)
      Adds a request a message to the prompting context. This function does not trigger the sending of the message to the prompting system, but just adds it to the prompting context. Invoking the prompt processing is always done by calling startNewMessage(String, boolean).
    • startNewMessage

      void startNewMessage(String text, boolean synchronous)
      Adds the text to the current prompting context and starts the processing of the prompt.
    • cancelCurrentRequest

      void cancelCurrentRequest()
    • addPromptingListener

      void addPromptingListener(IPromptingListener listener)
      Adds a listener to react on events from the prompting system, e.g. when a new response text is available or finished.
    • removePromptingListener

      void removePromptingListener(IPromptingListener listener)
    • addInterimComment

      void addInterimComment(String comment)
      Allows to add a comment into the currently running message processing. The comment is embedded into the response so that the prompting user interface can show the comment to the user as part of the reponse.
    • postIsolatedPrompt

      String postIsolatedPrompt(String prompt)
      During a prompt processing you may post dedicated prompts to the prompting that are not part of the original prompt processing.

      Example: the user sends a message into the prompting. During processing of this message the prompting processing wants to summarize this message.