Interface InvokeAgentRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,BedrockAgentRuntimeRequest.Builder
,Buildable
,CopyableBuilder<InvokeAgentRequest.Builder,
,InvokeAgentRequest> SdkBuilder<InvokeAgentRequest.Builder,
,InvokeAgentRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
InvokeAgentRequest
-
Method Summary
Modifier and TypeMethodDescriptionagentAliasId
(String agentAliasId) The alias of the agent to use.The unique identifier of the agent to use.default InvokeAgentRequest.Builder
bedrockModelConfigurations
(Consumer<BedrockModelConfigurations.Builder> bedrockModelConfigurations) Model performance settings for the request.bedrockModelConfigurations
(BedrockModelConfigurations bedrockModelConfigurations) Model performance settings for the request.enableTrace
(Boolean enableTrace) Specifies whether to turn on the trace or not to track the agent's reasoning process.endSession
(Boolean endSession) Specifies whether to end the session with the agent or not.The prompt text to send the agent.The unique identifier of the agent memory.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.default InvokeAgentRequest.Builder
promptCreationConfigurations
(Consumer<PromptCreationConfigurations.Builder> promptCreationConfigurations) Specifies parameters that control how the service populates the agent prompt for anInvokeAgent
request.promptCreationConfigurations
(PromptCreationConfigurations promptCreationConfigurations) Specifies parameters that control how the service populates the agent prompt for anInvokeAgent
request.The unique identifier of the session.default InvokeAgentRequest.Builder
sessionState
(Consumer<SessionState.Builder> sessionState) Contains parameters that specify various attributes of the session.sessionState
(SessionState sessionState) Contains parameters that specify various attributes of the session.The ARN of the resource making the request.default InvokeAgentRequest.Builder
streamingConfigurations
(Consumer<StreamingConfigurations.Builder> streamingConfigurations) Specifies the configurations for streaming.streamingConfigurations
(StreamingConfigurations streamingConfigurations) Specifies the configurations for streaming.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.BedrockAgentRuntimeRequest.Builder
build
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
agentAliasId
The alias of the agent to use.
- Parameters:
agentAliasId
- The alias of the agent to use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
agentId
The unique identifier of the agent to use.
- Parameters:
agentId
- The unique identifier of the agent to use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
bedrockModelConfigurations
InvokeAgentRequest.Builder bedrockModelConfigurations(BedrockModelConfigurations bedrockModelConfigurations) Model performance settings for the request.
- Parameters:
bedrockModelConfigurations
- Model performance settings for the request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
bedrockModelConfigurations
default InvokeAgentRequest.Builder bedrockModelConfigurations(Consumer<BedrockModelConfigurations.Builder> bedrockModelConfigurations) Model performance settings for the request.
This is a convenience method that creates an instance of theBedrockModelConfigurations.Builder
avoiding the need to create one manually viaBedrockModelConfigurations.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tobedrockModelConfigurations(BedrockModelConfigurations)
.- Parameters:
bedrockModelConfigurations
- a consumer that will call methods onBedrockModelConfigurations.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
enableTrace
Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.
- Parameters:
enableTrace
- Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
endSession
Specifies whether to end the session with the agent or not.
- Parameters:
endSession
- Specifies whether to end the session with the agent or not.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inputText
The prompt text to send the agent.
If you include
returnControlInvocationResults
in thesessionState
field, theinputText
field will be ignored.- Parameters:
inputText
- The prompt text to send the agent.If you include
returnControlInvocationResults
in thesessionState
field, theinputText
field will be ignored.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memoryId
The unique identifier of the agent memory.
- Parameters:
memoryId
- The unique identifier of the agent memory.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptCreationConfigurations
InvokeAgentRequest.Builder promptCreationConfigurations(PromptCreationConfigurations promptCreationConfigurations) Specifies parameters that control how the service populates the agent prompt for an
InvokeAgent
request. You can control which aspects of previous invocations in the same agent session the service uses to populate the agent prompt. This gives you more granular control over the contextual history that is used to process the current request.- Parameters:
promptCreationConfigurations
- Specifies parameters that control how the service populates the agent prompt for anInvokeAgent
request. You can control which aspects of previous invocations in the same agent session the service uses to populate the agent prompt. This gives you more granular control over the contextual history that is used to process the current request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptCreationConfigurations
default InvokeAgentRequest.Builder promptCreationConfigurations(Consumer<PromptCreationConfigurations.Builder> promptCreationConfigurations) Specifies parameters that control how the service populates the agent prompt for an
This is a convenience method that creates an instance of theInvokeAgent
request. You can control which aspects of previous invocations in the same agent session the service uses to populate the agent prompt. This gives you more granular control over the contextual history that is used to process the current request.PromptCreationConfigurations.Builder
avoiding the need to create one manually viaPromptCreationConfigurations.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed topromptCreationConfigurations(PromptCreationConfigurations)
.- Parameters:
promptCreationConfigurations
- a consumer that will call methods onPromptCreationConfigurations.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
sessionId
The unique identifier of the session. Use the same value across requests to continue the same conversation.
- Parameters:
sessionId
- The unique identifier of the session. Use the same value across requests to continue the same conversation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sessionState
Contains parameters that specify various attributes of the session. For more information, see Control session context.
If you include
returnControlInvocationResults
in thesessionState
field, theinputText
field will be ignored.- Parameters:
sessionState
- Contains parameters that specify various attributes of the session. For more information, see Control session context.If you include
returnControlInvocationResults
in thesessionState
field, theinputText
field will be ignored.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sessionState
Contains parameters that specify various attributes of the session. For more information, see Control session context.
If you include
returnControlInvocationResults
in thesessionState
field, theinputText
field will be ignored.SessionState.Builder
avoiding the need to create one manually viaSessionState.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tosessionState(SessionState)
.- Parameters:
sessionState
- a consumer that will call methods onSessionState.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
sourceArn
The ARN of the resource making the request.
- Parameters:
sourceArn
- The ARN of the resource making the request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
streamingConfigurations
Specifies the configurations for streaming.
To use agent streaming, you need permissions to perform the
bedrock:InvokeModelWithResponseStream
action.- Parameters:
streamingConfigurations
- Specifies the configurations for streaming.To use agent streaming, you need permissions to perform the
bedrock:InvokeModelWithResponseStream
action.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
streamingConfigurations
default InvokeAgentRequest.Builder streamingConfigurations(Consumer<StreamingConfigurations.Builder> streamingConfigurations) Specifies the configurations for streaming.
To use agent streaming, you need permissions to perform the
bedrock:InvokeModelWithResponseStream
action.StreamingConfigurations.Builder
avoiding the need to create one manually viaStreamingConfigurations.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tostreamingConfigurations(StreamingConfigurations)
.- Parameters:
streamingConfigurations
- a consumer that will call methods onStreamingConfigurations.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
InvokeAgentRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
InvokeAgentRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-