Class BaseLLMSession
java.lang.Object
com.mulesoft.modules.agent.broker.internal.extension.connection.BaseLLMSession
- All Implemented Interfaces:
LLMClient.LLMSession
- Direct Known Subclasses:
GeminiSession,OpenAISession
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConstraints(StringBuilder prompt) protected voidaddPromptExample(StringBuilder prompt) protected voidaddPromptIntro(StringBuilder prompt) protected voidaddPromptProcessSteps(StringBuilder prompt) protected voidprotected voidaddUserInstructionsSection(StringBuilder prompt, LLMRequest request) protected StringbuildSystemPrompt(LLMRequest request) protected abstract CompletableFuture<org.mule.runtime.api.functional.Either<LLMOutput,ToolSelection>> final LLMRequestfinal CompletableFuture<org.mule.runtime.api.functional.Either<LLMOutput,ToolSelection>> getNext()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mulesoft.modules.agent.broker.internal.extension.connection.LLMClient.LLMSession
addIteration, addToolResponse
-
Field Details
-
modelName
-
llmRequest
-
-
Constructor Details
-
BaseLLMSession
-
-
Method Details
-
getNext
public final CompletableFuture<org.mule.runtime.api.functional.Either<LLMOutput,ToolSelection>> getNext()- Specified by:
getNextin interfaceLLMClient.LLMSession
-
doGetNext
protected abstract CompletableFuture<org.mule.runtime.api.functional.Either<LLMOutput,ToolSelection>> doGetNext(Map<String, String> additionalHeaders) -
getInitialRequest
- Specified by:
getInitialRequestin interfaceLLMClient.LLMSession
-
buildSystemPrompt
-
addPromptIntro
-
addPromptProcessSteps
-
addPromptExample
-
addUserInstructionsSection
-
addToolExecutionGuidance
-
addConstraints
-