Class InvokeInlineAgentRequest

All Implemented Interfaces:
SdkPojo, ToCopyableBuilder<InvokeInlineAgentRequest.Builder,InvokeInlineAgentRequest>

@Generated("software.amazon.awssdk:codegen") public final class InvokeInlineAgentRequest extends BedrockAgentRuntimeRequest implements ToCopyableBuilder<InvokeInlineAgentRequest.Builder,InvokeInlineAgentRequest>
  • Method Details

    • hasActionGroups

      public final boolean hasActionGroups()
      For responses, this returns true if the service returned a value for the ActionGroups property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • actionGroups

      public final List<AgentActionGroup> actionGroups()

      A list of action groups with each action group defining the action the inline agent needs to carry out.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasActionGroups() method.

      Returns:
      A list of action groups with each action group defining the action the inline agent needs to carry out.
    • agentCollaboration

      public final AgentCollaboration agentCollaboration()

      Defines how the inline collaborator agent handles information across multiple collaborator agents to coordinate a final response. The inline collaborator agent can also be the supervisor.

      If the service returns an enum value that is not available in the current SDK version, agentCollaboration will return AgentCollaboration.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from agentCollaborationAsString().

      Returns:
      Defines how the inline collaborator agent handles information across multiple collaborator agents to coordinate a final response. The inline collaborator agent can also be the supervisor.
      See Also:
    • agentCollaborationAsString

      public final String agentCollaborationAsString()

      Defines how the inline collaborator agent handles information across multiple collaborator agents to coordinate a final response. The inline collaborator agent can also be the supervisor.

      If the service returns an enum value that is not available in the current SDK version, agentCollaboration will return AgentCollaboration.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from agentCollaborationAsString().

      Returns:
      Defines how the inline collaborator agent handles information across multiple collaborator agents to coordinate a final response. The inline collaborator agent can also be the supervisor.
      See Also:
    • agentName

      public final String agentName()

      The name for the agent.

      Returns:
      The name for the agent.
    • bedrockModelConfigurations

      public final InlineBedrockModelConfigurations bedrockModelConfigurations()

      Model settings for the request.

      Returns:
      Model settings for the request.
    • hasCollaboratorConfigurations

      public final boolean hasCollaboratorConfigurations()
      For responses, this returns true if the service returned a value for the CollaboratorConfigurations property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • collaboratorConfigurations

      public final List<CollaboratorConfiguration> collaboratorConfigurations()

      Settings for an inline agent collaborator called with InvokeInlineAgent.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasCollaboratorConfigurations() method.

      Returns:
      Settings for an inline agent collaborator called with InvokeInlineAgent.
    • hasCollaborators

      public final boolean hasCollaborators()
      For responses, this returns true if the service returned a value for the Collaborators property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • collaborators

      public final List<Collaborator> collaborators()

      List of collaborator inline agents.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasCollaborators() method.

      Returns:
      List of collaborator inline agents.
    • customOrchestration

      public final CustomOrchestration customOrchestration()

      Contains details of the custom orchestration configured for the agent.

      Returns:
      Contains details of the custom orchestration configured for the agent.
    • customerEncryptionKeyArn

      public final String customerEncryptionKeyArn()

      The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent.

      Returns:
      The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent.
    • enableTrace

      public final Boolean enableTrace()

      Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Using trace.

      Returns:
      Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Using trace.
    • endSession

      public final Boolean endSession()

      Specifies whether to end the session with the inline agent or not.

      Returns:
      Specifies whether to end the session with the inline agent or not.
    • foundationModel

      public final String foundationModel()

      The model identifier (ID) of the model to use for orchestration by the inline agent. For example, meta.llama3-1-70b-instruct-v1:0.

      Returns:
      The model identifier (ID) of the model to use for orchestration by the inline agent. For example, meta.llama3-1-70b-instruct-v1:0.
    • guardrailConfiguration

      public final GuardrailConfigurationWithArn guardrailConfiguration()

      The guardrails to assign to the inline agent.

      Returns:
      The guardrails to assign to the inline agent.
    • idleSessionTTLInSeconds

      public final Integer idleSessionTTLInSeconds()

      The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent InvokeInlineAgent request begins a new session.

      A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.

      Returns:
      The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent InvokeInlineAgent request begins a new session.

      A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.

    • inlineSessionState

      public final InlineSessionState inlineSessionState()

      Parameters that specify the various attributes of a sessions. You can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group. For more information, see Control session context.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

      Returns:
      Parameters that specify the various attributes of a sessions. You can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group. For more information, see Control session context.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

    • inputText

      public final String inputText()

      The prompt text to send to the agent.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

      Returns:
      The prompt text to send to the agent.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

    • instruction

      public final String instruction()

      The instructions that tell the inline agent what it should do and how it should interact with users.

      Returns:
      The instructions that tell the inline agent what it should do and how it should interact with users.
    • hasKnowledgeBases

      public final boolean hasKnowledgeBases()
      For responses, this returns true if the service returned a value for the KnowledgeBases property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • knowledgeBases

      public final List<KnowledgeBase> knowledgeBases()

      Contains information of the knowledge bases to associate with.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasKnowledgeBases() method.

      Returns:
      Contains information of the knowledge bases to associate with.
    • orchestrationType

      public final OrchestrationType orchestrationType()

      Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.

      If the service returns an enum value that is not available in the current SDK version, orchestrationType will return OrchestrationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from orchestrationTypeAsString().

      Returns:
      Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.
      See Also:
    • orchestrationTypeAsString

      public final String orchestrationTypeAsString()

      Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.

      If the service returns an enum value that is not available in the current SDK version, orchestrationType will return OrchestrationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from orchestrationTypeAsString().

      Returns:
      Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.
      See Also:
    • promptCreationConfigurations

      public final PromptCreationConfigurations promptCreationConfigurations()

      Specifies parameters that control how the service populates the agent prompt for an InvokeInlineAgent 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:
      Specifies parameters that control how the service populates the agent prompt for an InvokeInlineAgent 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.
    • promptOverrideConfiguration

      public final PromptOverrideConfiguration promptOverrideConfiguration()

      Configurations for advanced prompts used to override the default prompts to enhance the accuracy of the inline agent.

      Returns:
      Configurations for advanced prompts used to override the default prompts to enhance the accuracy of the inline agent.
    • sessionId

      public final String sessionId()

      The unique identifier of the session. Use the same value across requests to continue the same conversation.

      Returns:
      The unique identifier of the session. Use the same value across requests to continue the same conversation.
    • streamingConfigurations

      public final StreamingConfigurations streamingConfigurations()

      Specifies the configurations for streaming.

      To use agent streaming, you need permissions to perform the bedrock:InvokeModelWithResponseStream action.

      Returns:
      Specifies the configurations for streaming.

      To use agent streaming, you need permissions to perform the bedrock:InvokeModelWithResponseStream action.

    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<InvokeInlineAgentRequest.Builder,InvokeInlineAgentRequest>
      Specified by:
      toBuilder in class BedrockAgentRuntimeRequest
      Returns:
      a builder for type T
    • builder

      public static InvokeInlineAgentRequest.Builder builder()
    • serializableBuilderClass

      public static Class<? extends InvokeInlineAgentRequest.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class AwsRequest
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsRequest
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
      Description copied from class: SdkRequest
      Used to retrieve the value of a field from any class that extends SdkRequest. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class) method will again be available.
      Overrides:
      getValueForField in class SdkRequest
      Parameters:
      fieldName - The name of the member to be retrieved.
      clazz - The class to cast the returned object to.
      Returns:
      Optional containing the casted return value
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.