Interface FallbackTarget.Builder

  • Method Details

    • targetName

      FallbackTarget.Builder targetName(String targetName)

      The name of the gateway target to fall back to. The target must be an inference target.

      Parameters:
      targetName - The name of the gateway target to fall back to. The target must be an inference target.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • model

      The model ID to send to this fallback target. If you don't specify a model, the gateway sends the model from the original request.

      Parameters:
      model - The model ID to send to this fallback target. If you don't specify a model, the gateway sends the model from the original request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • triggerOn

      The status codes and errors from this target that cause the gateway to send the request to the next fallback target. This setting isn't inherited from the route. If you omit it, the gateway uses the default triggers: 5XX status codes and the CONNECTION_ERROR, FIRST_BYTE_TIMEOUT, and UNROUTABLE errors.

      Parameters:
      triggerOn - The status codes and errors from this target that cause the gateway to send the request to the next fallback target. This setting isn't inherited from the route. If you omit it, the gateway uses the default triggers: 5XX status codes and the CONNECTION_ERROR, FIRST_BYTE_TIMEOUT, and UNROUTABLE errors.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • triggerOn

      The status codes and errors from this target that cause the gateway to send the request to the next fallback target. This setting isn't inherited from the route. If you omit it, the gateway uses the default triggers: 5XX status codes and the CONNECTION_ERROR, FIRST_BYTE_TIMEOUT, and UNROUTABLE errors.

      This is a convenience method that creates an instance of the FallbackTriggers.Builder avoiding the need to create one manually via FallbackTriggers.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to triggerOn(FallbackTriggers).

      Parameters:
      triggerOn - a consumer that will call methods on FallbackTriggers.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • firstByteTimeoutMilliseconds

      FallbackTarget.Builder firstByteTimeoutMilliseconds(Integer firstByteTimeoutMilliseconds)

      The maximum time, in milliseconds, from sending the request to this target until the first byte of the response body arrives. This setting isn't inherited from the route. If you don't specify a value, no timeout is enforced.

      Parameters:
      firstByteTimeoutMilliseconds - The maximum time, in milliseconds, from sending the request to this target until the first byte of the response body arrives. This setting isn't inherited from the route. If you don't specify a value, no timeout is enforced.
      Returns:
      Returns a reference to this object so that method calls can be chained together.