Class: Aws::SageMakerRuntimeHTTP2::AsyncClient
- Inherits:
-
Seahorse::Client::AsyncBase
- Object
- Seahorse::Client::AsyncBase
- Aws::SageMakerRuntimeHTTP2::AsyncClient
- Includes:
- AsyncClientStubs
- Defined in:
- lib/aws-sdk-sagemakerruntimehttp2/async_client.rb,
sig/async_client.rbs
Overview
An API async client for SageMakerRuntimeHTTP2. To construct an async client, you need to configure a :region and :credentials.
async_client = Aws::SageMakerRuntimeHTTP2::AsyncClient.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Defined Under Namespace
Modules: _InvokeEndpointWithBidirectionalStreamResponseSuccess
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#invoke_endpoint_with_bidirectional_stream(params = {}) ⇒ Types::InvokeEndpointWithBidirectionalStreamOutput
Invokes a model endpoint with bidirectional streaming capabilities.
Class Method Summary collapse
- .errors_module ⇒ Object private
- .new ⇒ Object
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ AsyncClient
constructor
A new instance of AsyncClient.
Constructor Details
#initialize(options) ⇒ AsyncClient
Returns a new instance of AsyncClient.
403 404 405 406 407 408 |
# File 'lib/aws-sdk-sagemakerruntimehttp2/async_client.rb', line 403 def initialize(*args) unless Kernel.const_defined?("HTTP2") raise "Must include http/2 gem to use AsyncClient instances." end super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
651 652 653 |
# File 'lib/aws-sdk-sagemakerruntimehttp2/async_client.rb', line 651 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
654 655 656 |
# File 'lib/aws-sdk-sagemakerruntimehttp2/async_client.rb', line 654 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/async_client.rbs', line 14
def self.new: (
|
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/aws-sdk-sagemakerruntimehttp2/async_client.rb', line 614 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::SageMakerRuntimeHTTP2') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, http_response: Seahorse::Client::Http::AsyncResponse.new, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-sagemakerruntimehttp2' context[:gem_version] = '1.8.0' Seahorse::Client::Request.new(handlers, context) end |
#invoke_endpoint_with_bidirectional_stream(params = {}) ⇒ Types::InvokeEndpointWithBidirectionalStreamOutput
Invokes a model endpoint with bidirectional streaming capabilities. This operation establishes a persistent connection that allows you to send multiple requests and receive streaming responses from the model in real-time.
Bidirectional streaming is useful for interactive applications such as chatbots, real-time translation, or any scenario where you need to maintain a conversation-like interaction with the model. The connection remains open, allowing you to send additional input and receive responses without establishing a new connection for each request.
For an overview of Amazon SageMaker AI, see How It Works.
Amazon SageMaker AI strips all POST headers except those supported by the API. Amazon SageMaker AI might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax.
Calls to InvokeEndpointWithBidirectionalStream are authenticated by
using Amazon Web Services Signature Version 4. For information, see
Authenticating Requests (Amazon Web Services Signature Version 4)
in the Amazon S3 API Reference.
The bidirectional stream maintains the connection until either the client closes it or the model indicates completion. Each request and response in the stream is sent as an event with optional headers for data type and completion state.
76 |
# File 'sig/async_client.rbs', line 76
def invoke_endpoint_with_bidirectional_stream: (
|