Struct aws_sdk_sagemakerruntime::operation::invoke_endpoint_with_response_stream::InvokeEndpointWithResponseStreamOutput
source · #[non_exhaustive]pub struct InvokeEndpointWithResponseStreamOutput {
pub body: EventReceiver<ResponseStream, ResponseStreamError>,
pub content_type: Option<String>,
pub invoked_production_variant: Option<String>,
pub custom_attributes: Option<String>,
/* private fields */
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.body: EventReceiver<ResponseStream, ResponseStreamError>
A stream of payload parts. Each part contains a portion of the response for a streaming inference request.
content_type: Option<String>
The MIME type of the inference returned from the model container.
invoked_production_variant: Option<String>
Identifies the production variant that was invoked.
custom_attributes: Option<String>
Provides additional information in the response about the inference returned by a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to return an ID received in the CustomAttributes
header of a request or other metadata that a service endpoint was programmed to produce. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back.
The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID:
in your post-processing function.
This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.
Implementations§
source§impl InvokeEndpointWithResponseStreamOutput
impl InvokeEndpointWithResponseStreamOutput
sourcepub fn body(&self) -> &EventReceiver<ResponseStream, ResponseStreamError>
pub fn body(&self) -> &EventReceiver<ResponseStream, ResponseStreamError>
A stream of payload parts. Each part contains a portion of the response for a streaming inference request.
sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
The MIME type of the inference returned from the model container.
sourcepub fn invoked_production_variant(&self) -> Option<&str>
pub fn invoked_production_variant(&self) -> Option<&str>
Identifies the production variant that was invoked.
sourcepub fn custom_attributes(&self) -> Option<&str>
pub fn custom_attributes(&self) -> Option<&str>
Provides additional information in the response about the inference returned by a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to return an ID received in the CustomAttributes
header of a request or other metadata that a service endpoint was programmed to produce. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back.
The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID:
in your post-processing function.
This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.
source§impl InvokeEndpointWithResponseStreamOutput
impl InvokeEndpointWithResponseStreamOutput
sourcepub fn builder() -> InvokeEndpointWithResponseStreamOutputBuilder
pub fn builder() -> InvokeEndpointWithResponseStreamOutputBuilder
Creates a new builder-style object to manufacture InvokeEndpointWithResponseStreamOutput
.
Trait Implementations§
source§impl RequestId for InvokeEndpointWithResponseStreamOutput
impl RequestId for InvokeEndpointWithResponseStreamOutput
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.Auto Trait Implementations§
impl !Freeze for InvokeEndpointWithResponseStreamOutput
impl !RefUnwindSafe for InvokeEndpointWithResponseStreamOutput
impl Send for InvokeEndpointWithResponseStreamOutput
impl Sync for InvokeEndpointWithResponseStreamOutput
impl Unpin for InvokeEndpointWithResponseStreamOutput
impl !UnwindSafe for InvokeEndpointWithResponseStreamOutput
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more