Class PromptingChatGPT

All Implemented Interfaces:
IPrompting, IPromptingWithTools

public class PromptingChatGPT extends PromptingWithToolsBase implements IPromptingWithTools
ChatGPT API implementation using ChatGPT's assistant API. This is a quite outdated version of interfacing to ChatGPT - the more up to date version is PromptingChatGPTResponsesAPI.
  • Constructor Details

    • PromptingChatGPT

      public PromptingChatGPT()
  • Method Details

    • initialize

      protected void initialize()
    • calculateAssistantId

      protected void calculateAssistantId()
    • calculateThreadId

      protected void calculateThreadId()
    • startNewMessageExecute

      protected void startNewMessageExecute(List<PromptingMessage> messages)
      Description copied from class: PromptingBase
      Actual implementation of sending the prompt text to the LLM.
      Overrides:
      startNewMessageExecute in class PromptingBase
      Parameters:
      messages - All the messages of this prompting session.
    • processToolOutput

      public void processToolOutput(PromptingToolOutputs ptos)
      Description copied from interface: IPromptingWithTools
      This function to be called by the callback processing transferring the result of processing back to the LLM.
      Specified by:
      processToolOutput in interface IPromptingWithTools
      Overrides:
      processToolOutput in class PromptingWithToolsBase
    • postIsolatedPrompt

      public String postIsolatedPrompt(String prompt)
      Description copied from interface: IPrompting
      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.
      Specified by:
      postIsolatedPrompt in interface IPrompting