Package org.eclnt.ccee.prompting.chatgpt
Class PromptingChatGPTResponsesAPI
java.lang.Object
org.eclnt.ccee.prompting.PromptingBase
org.eclnt.ccee.prompting.PromptingWithToolsBase
org.eclnt.ccee.prompting.chatgpt.PromptingChatGPTResponsesAPI
- All Implemented Interfaces:
IPrompting,IPromptingWithTools
public class PromptingChatGPTResponsesAPI
extends PromptingWithToolsBase
implements IPromptingWithTools
Implementation of
IPromptingWithTools using responses API. This is
the more up to date version of the prompting implementation - compared to
PromptingChatGPT.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclnt.ccee.prompting.PromptingBase
PromptingBase.ErrorRequestCancelled, PromptingBase.PromptingRequestThread -
Field Summary
Fields inherited from class org.eclnt.ccee.prompting.PromptingWithToolsBase
m_contextAssigner, m_promptingToolFields inherited from class org.eclnt.ccee.prompting.PromptingBase
m_listeners -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected HttpCommunicationChatGPTFactory method for creaeting the http communication layer.protected voidpostIsolatedPrompt(String prompt) Process a prompt directly wihtout streamingvoidThis function to be called by the callback processing transferring the result of processing back to the LLM.voidsetModelId(String modelId) protected voidstartNewMessageExecute(List<PromptingMessage> messages) Actual implementation of sending the prompt text to the LLM.Methods inherited from class org.eclnt.ccee.prompting.PromptingWithToolsBase
callBackTools, initializeContextToToolsThreadAssigner, initializeToolMethods inherited from class org.eclnt.ccee.prompting.PromptingBase
addInitialSystemMessage, addInterimComment, addMessage, addMessageExtender, addPromptingListener, cancelCurrentRequest, createRequestThread, getMessageExtenders, getWithInterimFramgents, mdComment, prepareNewMessage, processResponseCompleted, processResponseMarkdownFragmentReceived, removeMessageExtender, removePromptingListener, setWithInterimFramgents, startNewMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclnt.ccee.prompting.IPrompting
addInterimComment, addMessage, addPromptingListener, cancelCurrentRequest, removePromptingListener, startNewMessageMethods inherited from interface org.eclnt.ccee.prompting.IPromptingWithTools
initializeContextToToolsThreadAssigner, initializeTool
-
Constructor Details
-
PromptingChatGPTResponsesAPI
public PromptingChatGPTResponsesAPI()
-
-
Method Details
-
getModelId
-
setModelId
-
initialize
protected void initialize() -
startNewMessageExecute
Description copied from class:PromptingBaseActual implementation of sending the prompt text to the LLM.- Overrides:
startNewMessageExecutein classPromptingBase- Parameters:
messages- All the messages of this prompting session.
-
processToolOutput
Description copied from interface:IPromptingWithToolsThis function to be called by the callback processing transferring the result of processing back to the LLM.- Specified by:
processToolOutputin interfaceIPromptingWithTools- Overrides:
processToolOutputin classPromptingWithToolsBase
-
postIsolatedPrompt
Process a prompt directly wihtout streaming- Specified by:
postIsolatedPromptin interfaceIPrompting- Returns:
-
createHttpCommunicationChatGPT
Factory method for creaeting the http communication layer.
-