Interface InvokeInferenceRouterRequest.Builder

  • Method Details

    • inferenceRouterName

      InvokeInferenceRouterRequest.Builder inferenceRouterName(String inferenceRouterName)

      The name of the inference router to invoke.

      Parameters:
      inferenceRouterName - The name of the inference router to invoke.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • routingTargetName

      InvokeInferenceRouterRequest.Builder routingTargetName(String routingTargetName)

      The name of the routing target in the inference router. The routing target lists the destinations that can serve the request.

      Parameters:
      routingTargetName - The name of the routing target in the inference router. The routing target lists the destinations that can serve the request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contentType

      InvokeInferenceRouterRequest.Builder contentType(String contentType)

      The MIME type of the input data in the request body. The router passes it to the destination.

      Parameters:
      contentType - The MIME type of the input data in the request body. The router passes it to the destination.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • accept

      The MIME type that you want for the inference response. The router passes it to the destination.

      Parameters:
      accept - The MIME type that you want for the inference response. The router passes it to the destination.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • inferenceId

      InvokeInferenceRouterRequest.Builder inferenceId(String inferenceId)

      An identifier for the inference request. The router passes it to the destination.

      Parameters:
      inferenceId - An identifier for the inference request. The router passes it to the destination.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • prefixAwareId

      InvokeInferenceRouterRequest.Builder prefixAwareId(String prefixAwareId)

      An optional, stable identifier that serves as a routing hint for prefix-aware routing. The router passes it to the destination that serves the request. Within that destination, requests with the same prefix and the same identifier go to the same instance. If requests from different applications might have the same prompt prefix, set a different identifier for each application to differentiate their routing decisions.

      Applies only to destination endpoints configured with a RoutingStrategy of PREFIX_AWARE.

      Parameters:
      prefixAwareId - An optional, stable identifier that serves as a routing hint for prefix-aware routing. The router passes it to the destination that serves the request. Within that destination, requests with the same prefix and the same identifier go to the same instance. If requests from different applications might have the same prompt prefix, set a different identifier for each application to differentiate their routing decisions.

      Applies only to destination endpoints configured with a RoutingStrategy of PREFIX_AWARE.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • customAttributes

      InvokeInferenceRouterRequest.Builder customAttributes(String customAttributes)

      Provides additional information about the inference request. The value is an opaque string that the router passes, unchanged, to the model container of the destination that serves the request. The value can contain up to 1,024 visible US-ASCII characters.

      Parameters:
      customAttributes - Provides additional information about the inference request. The value is an opaque string that the router passes, unchanged, to the model container of the destination that serves the request. The value can contain up to 1,024 visible US-ASCII characters.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • body

      The input data for the inference, in the format that your model expects. The body can't be empty.

      Parameters:
      body - The input data for the inference, in the format that your model expects. The body can't be empty.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      InvokeInferenceRouterRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.