Struct aws_sdk_bedrockruntime::operation::invoke_model_with_response_stream::builders::InvokeModelWithResponseStreamFluentBuilder
source · pub struct InvokeModelWithResponseStreamFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to InvokeModelWithResponseStream
.
Invoke the specified Bedrock model to run inference using the input provided. Return the response in a stream.
For more information, see Run inference in the Bedrock User Guide.
For an example request and response, see Examples (after the Errors section).
Implementations§
source§impl InvokeModelWithResponseStreamFluentBuilder
impl InvokeModelWithResponseStreamFluentBuilder
sourcepub fn as_input(&self) -> &InvokeModelWithResponseStreamInputBuilder
pub fn as_input(&self) -> &InvokeModelWithResponseStreamInputBuilder
Access the InvokeModelWithResponseStream as a reference.
sourcepub async fn send(
self
) -> Result<InvokeModelWithResponseStreamOutput, SdkError<InvokeModelWithResponseStreamError, HttpResponse>>
pub async fn send( self ) -> Result<InvokeModelWithResponseStreamOutput, SdkError<InvokeModelWithResponseStreamError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<InvokeModelWithResponseStreamOutput, InvokeModelWithResponseStreamError, Self>
pub fn customize( self ) -> CustomizableOperation<InvokeModelWithResponseStreamOutput, InvokeModelWithResponseStreamError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn body(self, input: Blob) -> Self
pub fn body(self, input: Blob) -> Self
Inference input in the format specified by the content-type. To see the format and content of this field for different models, refer to Inference parameters.
sourcepub fn set_body(self, input: Option<Blob>) -> Self
pub fn set_body(self, input: Option<Blob>) -> Self
Inference input in the format specified by the content-type. To see the format and content of this field for different models, refer to Inference parameters.
sourcepub fn get_body(&self) -> &Option<Blob>
pub fn get_body(&self) -> &Option<Blob>
Inference input in the format specified by the content-type. To see the format and content of this field for different models, refer to Inference parameters.
sourcepub fn content_type(self, input: impl Into<String>) -> Self
pub fn content_type(self, input: impl Into<String>) -> Self
The MIME type of the input data in the request. The default value is application/json
.
sourcepub fn set_content_type(self, input: Option<String>) -> Self
pub fn set_content_type(self, input: Option<String>) -> Self
The MIME type of the input data in the request. The default value is application/json
.
sourcepub fn get_content_type(&self) -> &Option<String>
pub fn get_content_type(&self) -> &Option<String>
The MIME type of the input data in the request. The default value is application/json
.
sourcepub fn accept(self, input: impl Into<String>) -> Self
pub fn accept(self, input: impl Into<String>) -> Self
The desired MIME type of the inference body in the response. The default value is application/json
.
sourcepub fn set_accept(self, input: Option<String>) -> Self
pub fn set_accept(self, input: Option<String>) -> Self
The desired MIME type of the inference body in the response. The default value is application/json
.
sourcepub fn get_accept(&self) -> &Option<String>
pub fn get_accept(&self) -> &Option<String>
The desired MIME type of the inference body in the response. The default value is application/json
.
sourcepub fn model_id(self, input: impl Into<String>) -> Self
pub fn model_id(self, input: impl Into<String>) -> Self
Id of the model to invoke using the streaming request.
sourcepub fn set_model_id(self, input: Option<String>) -> Self
pub fn set_model_id(self, input: Option<String>) -> Self
Id of the model to invoke using the streaming request.
sourcepub fn get_model_id(&self) -> &Option<String>
pub fn get_model_id(&self) -> &Option<String>
Id of the model to invoke using the streaming request.
Trait Implementations§
source§impl Clone for InvokeModelWithResponseStreamFluentBuilder
impl Clone for InvokeModelWithResponseStreamFluentBuilder
source§fn clone(&self) -> InvokeModelWithResponseStreamFluentBuilder
fn clone(&self) -> InvokeModelWithResponseStreamFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more