Package org.eclnt.ccee.prompting
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.
This interface is used by prompting controls on UI level to talk to a prompting system.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterimComment(String comment) Allows to add a comment into the currently running message processing.voidaddMessage(PromptingMessage message) Adds a request a message to the prompting context.voidaddPromptingListener(IPromptingListener listener) Adds a listener to react on events from the prompting system, e.g. when a new response text is available or finished.voidpostIsolatedPrompt(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.voidremovePromptingListener(IPromptingListener listener) voidstartNewMessage(String text, boolean synchronous) Adds the text to the current prompting context and starts the processing of the prompt.
-
Method Details
-
addMessage
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 callingstartNewMessage(String, boolean). -
startNewMessage
Adds the text to the current prompting context and starts the processing of the prompt. -
cancelCurrentRequest
void cancelCurrentRequest() -
addPromptingListener
Adds a listener to react on events from the prompting system, e.g. when a new response text is available or finished. -
removePromptingListener
-
addInterimComment
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
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.
-