Class GeminiSession
java.lang.Object
com.mulesoft.modules.agent.broker.internal.extension.connection.BaseLLMSession
com.mulesoft.modules.agent.broker.internal.extension.connection.gemini.GeminiSession
- All Implemented Interfaces:
LLMClient.LLMSession
-
Field Summary
FieldsFields inherited from class com.mulesoft.modules.agent.broker.internal.extension.connection.BaseLLMSession
llmRequest, modelName -
Constructor Summary
ConstructorsConstructorDescriptionGeminiSession(com.google.genai.Client client, LLMRequest llmRequest, GeminiSettings settings, List<com.google.genai.types.Tool> tools, Set<String> a2aToolSet) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConstraints(StringBuilder prompt) voidaddIteration(Iteration iteration) voidaddToolResponse(ToolResponse toolResponse) protected CompletableFuture<org.mule.runtime.api.functional.Either<LLMOutput,ToolSelection>> MG says: implementation hint.Methods inherited from class com.mulesoft.modules.agent.broker.internal.extension.connection.BaseLLMSession
addPromptExample, addPromptIntro, addPromptProcessSteps, addToolExecutionGuidance, addUserInstructionsSection, buildSystemPrompt, getInitialRequest, getNext
-
Field Details
-
PROVIDE_STRUCTURED_ANSWER
- See Also:
-
LLM_ERROR_STRING
- See Also:
-
LLM_ROLE_MODEL
- See Also:
-
-
Constructor Details
-
GeminiSession
public GeminiSession(com.google.genai.Client client, LLMRequest llmRequest, GeminiSettings settings, List<com.google.genai.types.Tool> tools, Set<String> a2aToolSet)
-
-
Method Details
-
addConstraints
- Overrides:
addConstraintsin classBaseLLMSession
-
doGetNext
protected CompletableFuture<org.mule.runtime.api.functional.Either<LLMOutput,ToolSelection>> doGetNext(Map<String, String> additionalHeaders) MG says: implementation hint. Gemini doesn't support function calls and structured output at the same time. Define an LLMOutput equivalent function to compensate. Go to master branch and see the (now defunct) FunctionBasedSession class for reference- Specified by:
doGetNextin classBaseLLMSession
-
addIteration
-
addToolResponse
-