Interface SessionState.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<SessionState.Builder,SessionState>,SdkBuilder<SessionState.Builder,SessionState>,SdkPojo
- Enclosing class:
- SessionState
@Mutable @NotThreadSafe public static interface SessionState.Builder extends SdkPojo, CopyableBuilder<SessionState.Builder,SessionState>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default SessionState.BuilderconversationHistory(Consumer<ConversationHistory.Builder> conversationHistory)The state's conversation history.SessionState.BuilderconversationHistory(ConversationHistory conversationHistory)The state's conversation history.SessionState.Builderfiles(Collection<InputFile> files)Contains information about the files used by code interpreter.SessionState.Builderfiles(Consumer<InputFile.Builder>... files)Contains information about the files used by code interpreter.SessionState.Builderfiles(InputFile... files)Contains information about the files used by code interpreter.SessionState.BuilderinvocationId(String invocationId)The identifier of the invocation of an action.SessionState.BuilderknowledgeBaseConfigurations(Collection<KnowledgeBaseConfiguration> knowledgeBaseConfigurations)An array of configurations, each of which applies to a knowledge base attached to the agent.SessionState.BuilderknowledgeBaseConfigurations(Consumer<KnowledgeBaseConfiguration.Builder>... knowledgeBaseConfigurations)An array of configurations, each of which applies to a knowledge base attached to the agent.SessionState.BuilderknowledgeBaseConfigurations(KnowledgeBaseConfiguration... knowledgeBaseConfigurations)An array of configurations, each of which applies to a knowledge base attached to the agent.SessionState.BuilderpromptSessionAttributes(Map<String,String> promptSessionAttributes)Contains attributes that persist across a prompt and the values of those attributes.SessionState.BuilderreturnControlInvocationResults(Collection<InvocationResultMember> returnControlInvocationResults)Contains information about the results from the action group invocation.SessionState.BuilderreturnControlInvocationResults(Consumer<InvocationResultMember.Builder>... returnControlInvocationResults)Contains information about the results from the action group invocation.SessionState.BuilderreturnControlInvocationResults(InvocationResultMember... returnControlInvocationResults)Contains information about the results from the action group invocation.SessionState.BuildersessionAttributes(Map<String,String> sessionAttributes)Contains attributes that persist across a session and the values of those attributes.-
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 Detail
-
conversationHistory
SessionState.Builder conversationHistory(ConversationHistory conversationHistory)
The state's conversation history.
- Parameters:
conversationHistory- The state's conversation history.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
conversationHistory
default SessionState.Builder conversationHistory(Consumer<ConversationHistory.Builder> conversationHistory)
The state's conversation history.
This is a convenience method that creates an instance of theConversationHistory.Builderavoiding the need to create one manually viaConversationHistory.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toconversationHistory(ConversationHistory).- Parameters:
conversationHistory- a consumer that will call methods onConversationHistory.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
conversationHistory(ConversationHistory)
-
files
SessionState.Builder files(Collection<InputFile> files)
Contains information about the files used by code interpreter.
- Parameters:
files- Contains information about the files used by code interpreter.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
files
SessionState.Builder files(InputFile... files)
Contains information about the files used by code interpreter.
- Parameters:
files- Contains information about the files used by code interpreter.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
files
SessionState.Builder files(Consumer<InputFile.Builder>... files)
Contains information about the files used by code interpreter.
This is a convenience method that creates an instance of theInputFile.Builderavoiding the need to create one manually viaInputFile.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#files(List.) - Parameters:
files- a consumer that will call methods onInputFile.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#files(java.util.Collection)
-
invocationId
SessionState.Builder invocationId(String invocationId)
The identifier of the invocation of an action. This value must match the
invocationIdreturned in theInvokeAgentresponse for the action whose results are provided in thereturnControlInvocationResultsfield. For more information, see Return control to the agent developer and Control session context.- Parameters:
invocationId- The identifier of the invocation of an action. This value must match theinvocationIdreturned in theInvokeAgentresponse for the action whose results are provided in thereturnControlInvocationResultsfield. For more information, see Return control to the agent developer and Control session context.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
knowledgeBaseConfigurations
SessionState.Builder knowledgeBaseConfigurations(Collection<KnowledgeBaseConfiguration> knowledgeBaseConfigurations)
An array of configurations, each of which applies to a knowledge base attached to the agent.
- Parameters:
knowledgeBaseConfigurations- An array of configurations, each of which applies to a knowledge base attached to the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
knowledgeBaseConfigurations
SessionState.Builder knowledgeBaseConfigurations(KnowledgeBaseConfiguration... knowledgeBaseConfigurations)
An array of configurations, each of which applies to a knowledge base attached to the agent.
- Parameters:
knowledgeBaseConfigurations- An array of configurations, each of which applies to a knowledge base attached to the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
knowledgeBaseConfigurations
SessionState.Builder knowledgeBaseConfigurations(Consumer<KnowledgeBaseConfiguration.Builder>... knowledgeBaseConfigurations)
An array of configurations, each of which applies to a knowledge base attached to the agent.
This is a convenience method that creates an instance of theKnowledgeBaseConfiguration.Builderavoiding the need to create one manually viaKnowledgeBaseConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#knowledgeBaseConfigurations(List.) - Parameters:
knowledgeBaseConfigurations- a consumer that will call methods onKnowledgeBaseConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#knowledgeBaseConfigurations(java.util.Collection)
-
promptSessionAttributes
SessionState.Builder promptSessionAttributes(Map<String,String> promptSessionAttributes)
Contains attributes that persist across a prompt and the values of those attributes.
-
In orchestration prompt template, these attributes replace the $prompt_session_attributes$ placeholder variable. For more information, see Prompt template placeholder variables.
-
In multi-agent collaboration, the
promptSessionAttributeswill only be used by supervisor agent when $prompt_session_attributes$ is present in prompt template.
- Parameters:
promptSessionAttributes- Contains attributes that persist across a prompt and the values of those attributes.-
In orchestration prompt template, these attributes replace the $prompt_session_attributes$ placeholder variable. For more information, see Prompt template placeholder variables.
-
In multi-agent collaboration, the
promptSessionAttributeswill only be used by supervisor agent when $prompt_session_attributes$ is present in prompt template.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
returnControlInvocationResults
SessionState.Builder returnControlInvocationResults(Collection<InvocationResultMember> returnControlInvocationResults)
Contains information about the results from the action group invocation. For more information, see Return control to the agent developer and Control session context.
If you include this field, the
inputTextfield will be ignored.- Parameters:
returnControlInvocationResults- Contains information about the results from the action group invocation. For more information, see Return control to the agent developer and Control session context.If you include this field, the
inputTextfield will be ignored.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
returnControlInvocationResults
SessionState.Builder returnControlInvocationResults(InvocationResultMember... returnControlInvocationResults)
Contains information about the results from the action group invocation. For more information, see Return control to the agent developer and Control session context.
If you include this field, the
inputTextfield will be ignored.- Parameters:
returnControlInvocationResults- Contains information about the results from the action group invocation. For more information, see Return control to the agent developer and Control session context.If you include this field, the
inputTextfield will be ignored.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
returnControlInvocationResults
SessionState.Builder returnControlInvocationResults(Consumer<InvocationResultMember.Builder>... returnControlInvocationResults)
Contains information about the results from the action group invocation. For more information, see Return control to the agent developer and Control session context.
This is a convenience method that creates an instance of theIf you include this field, the
inputTextfield will be ignored.InvocationResultMember.Builderavoiding the need to create one manually viaInvocationResultMember.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#returnControlInvocationResults(List.) - Parameters:
returnControlInvocationResults- a consumer that will call methods onInvocationResultMember.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#returnControlInvocationResults(java.util.Collection)
-
sessionAttributes
SessionState.Builder sessionAttributes(Map<String,String> sessionAttributes)
Contains attributes that persist across a session and the values of those attributes. If
sessionAttributesare passed to a supervisor agent in multi-agent collaboration, it will be forwarded to all agent collaborators.- Parameters:
sessionAttributes- Contains attributes that persist across a session and the values of those attributes. IfsessionAttributesare passed to a supervisor agent in multi-agent collaboration, it will be forwarded to all agent collaborators.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-