AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
BedrockRuntimeClient.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/core/client/ClientConfiguration.h>
9#include <aws/core/client/AWSClient.h>
10#include <aws/core/client/AWSClientAsyncCRTP.h>
11#include <aws/core/utils/json/JsonSerializer.h>
12#include <aws/bedrock-runtime/BedrockRuntimeServiceClientModel.h>
13
14namespace Aws
15{
16namespace BedrockRuntime
17{
22 class AWS_BEDROCKRUNTIME_API BedrockRuntimeClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods<BedrockRuntimeClient>
23 {
24 public:
26 static const char* GetServiceName();
27 static const char* GetAllocationTag();
28
31
37 std::shared_ptr<BedrockRuntimeEndpointProviderBase> endpointProvider = nullptr);
38
44 std::shared_ptr<BedrockRuntimeEndpointProviderBase> endpointProvider = nullptr,
46
51 BedrockRuntimeClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
52 std::shared_ptr<BedrockRuntimeEndpointProviderBase> endpointProvider = nullptr,
54
55
56 /* Legacy constructors due deprecation */
62
68 const Aws::Client::ClientConfiguration& clientConfiguration);
69
74 BedrockRuntimeClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
75 const Aws::Client::ClientConfiguration& clientConfiguration);
76
77 /* End of legacy constructors due deprecation */
79
86
90 template<typename ApplyGuardrailRequestT = Model::ApplyGuardrailRequest>
91 Model::ApplyGuardrailOutcomeCallable ApplyGuardrailCallable(const ApplyGuardrailRequestT& request) const
92 {
93 return SubmitCallable(&BedrockRuntimeClient::ApplyGuardrail, request);
94 }
95
99 template<typename ApplyGuardrailRequestT = Model::ApplyGuardrailRequest>
100 void ApplyGuardrailAsync(const ApplyGuardrailRequestT& request, const ApplyGuardrailResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
101 {
102 return SubmitAsync(&BedrockRuntimeClient::ApplyGuardrail, request, handler, context);
103 }
104
124
128 template<typename ConverseRequestT = Model::ConverseRequest>
129 Model::ConverseOutcomeCallable ConverseCallable(const ConverseRequestT& request) const
130 {
131 return SubmitCallable(&BedrockRuntimeClient::Converse, request);
132 }
133
137 template<typename ConverseRequestT = Model::ConverseRequest>
138 void ConverseAsync(const ConverseRequestT& request, const ConverseResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
139 {
140 return SubmitAsync(&BedrockRuntimeClient::Converse, request, handler, context);
141 }
142
168
172 template<typename ConverseStreamRequestT = Model::ConverseStreamRequest>
174 {
175 return SubmitCallable(&BedrockRuntimeClient::ConverseStream, request);
176 }
177
181 template<typename ConverseStreamRequestT = Model::ConverseStreamRequest>
182 void ConverseStreamAsync(ConverseStreamRequestT& request, const ConverseStreamResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
183 {
184 return SubmitAsync(&BedrockRuntimeClient::ConverseStream, request, handler, context);
185 }
186
198
202 template<typename InvokeModelRequestT = Model::InvokeModelRequest>
203 Model::InvokeModelOutcomeCallable InvokeModelCallable(const InvokeModelRequestT& request) const
204 {
205 return SubmitCallable(&BedrockRuntimeClient::InvokeModel, request);
206 }
207
211 template<typename InvokeModelRequestT = Model::InvokeModelRequest>
212 void InvokeModelAsync(const InvokeModelRequestT& request, const InvokeModelResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
213 {
214 return SubmitAsync(&BedrockRuntimeClient::InvokeModel, request, handler, context);
215 }
216
233
237 template<typename InvokeModelWithResponseStreamRequestT = Model::InvokeModelWithResponseStreamRequest>
239 {
240 return SubmitCallable(&BedrockRuntimeClient::InvokeModelWithResponseStream, request);
241 }
242
246 template<typename InvokeModelWithResponseStreamRequestT = Model::InvokeModelWithResponseStreamRequest>
247 void InvokeModelWithResponseStreamAsync(InvokeModelWithResponseStreamRequestT& request, const InvokeModelWithResponseStreamResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
248 {
249 return SubmitAsync(&BedrockRuntimeClient::InvokeModelWithResponseStream, request, handler, context);
250 }
251
252
253 void OverrideEndpoint(const Aws::String& endpoint);
254 std::shared_ptr<BedrockRuntimeEndpointProviderBase>& accessEndpointProvider();
255 private:
257 void init(const BedrockRuntimeClientConfiguration& clientConfiguration);
258
259 BedrockRuntimeClientConfiguration m_clientConfiguration;
260 std::shared_ptr<BedrockRuntimeEndpointProviderBase> m_endpointProvider;
261 };
262
263} // namespace BedrockRuntime
264} // namespace Aws
BedrockRuntimeEndpointProvider EndpointProviderType
BedrockRuntimeClient(const Aws::Client::ClientConfiguration &clientConfiguration)
void OverrideEndpoint(const Aws::String &endpoint)
std::shared_ptr< BedrockRuntimeEndpointProviderBase > & accessEndpointProvider()
BedrockRuntimeClient(const std::shared_ptr< Aws::Auth::AWSCredentialsProvider > &credentialsProvider, std::shared_ptr< BedrockRuntimeEndpointProviderBase > endpointProvider=nullptr, const Aws::BedrockRuntime::BedrockRuntimeClientConfiguration &clientConfiguration=Aws::BedrockRuntime::BedrockRuntimeClientConfiguration())
Model::InvokeModelOutcomeCallable InvokeModelCallable(const InvokeModelRequestT &request) const
BedrockRuntimeClient(const Aws::Auth::AWSCredentials &credentials, const Aws::Client::ClientConfiguration &clientConfiguration)
virtual Model::ConverseOutcome Converse(const Model::ConverseRequest &request) const
BedrockRuntimeClient(const Aws::Auth::AWSCredentials &credentials, std::shared_ptr< BedrockRuntimeEndpointProviderBase > endpointProvider=nullptr, const Aws::BedrockRuntime::BedrockRuntimeClientConfiguration &clientConfiguration=Aws::BedrockRuntime::BedrockRuntimeClientConfiguration())
virtual Model::ApplyGuardrailOutcome ApplyGuardrail(const Model::ApplyGuardrailRequest &request) const
void ConverseAsync(const ConverseRequestT &request, const ConverseResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
virtual Model::InvokeModelWithResponseStreamOutcome InvokeModelWithResponseStream(Model::InvokeModelWithResponseStreamRequest &request) const
Model::ApplyGuardrailOutcomeCallable ApplyGuardrailCallable(const ApplyGuardrailRequestT &request) const
Model::InvokeModelWithResponseStreamOutcomeCallable InvokeModelWithResponseStreamCallable(InvokeModelWithResponseStreamRequestT &request) const
virtual Model::ConverseStreamOutcome ConverseStream(Model::ConverseStreamRequest &request) const
BedrockRuntimeClient(const Aws::BedrockRuntime::BedrockRuntimeClientConfiguration &clientConfiguration=Aws::BedrockRuntime::BedrockRuntimeClientConfiguration(), std::shared_ptr< BedrockRuntimeEndpointProviderBase > endpointProvider=nullptr)
void InvokeModelWithResponseStreamAsync(InvokeModelWithResponseStreamRequestT &request, const InvokeModelWithResponseStreamResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Model::ConverseStreamOutcomeCallable ConverseStreamCallable(ConverseStreamRequestT &request) const
BedrockRuntimeClientConfiguration ClientConfigurationType
void ConverseStreamAsync(ConverseStreamRequestT &request, const ConverseStreamResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
void InvokeModelAsync(const InvokeModelRequestT &request, const InvokeModelResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
void ApplyGuardrailAsync(const ApplyGuardrailRequestT &request, const ApplyGuardrailResponseReceivedHandler &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
Model::ConverseOutcomeCallable ConverseCallable(const ConverseRequestT &request) const
virtual Model::InvokeModelOutcome InvokeModel(const Model::InvokeModelRequest &request) const
BedrockRuntimeClient(const std::shared_ptr< Aws::Auth::AWSCredentialsProvider > &credentialsProvider, const Aws::Client::ClientConfiguration &clientConfiguration)
std::future< InvokeModelWithResponseStreamOutcome > InvokeModelWithResponseStreamOutcomeCallable
std::future< InvokeModelOutcome > InvokeModelOutcomeCallable
std::future< ConverseOutcome > ConverseOutcomeCallable
std::future< ConverseStreamOutcome > ConverseStreamOutcomeCallable
std::future< ApplyGuardrailOutcome > ApplyGuardrailOutcomeCallable
std::function< void(const BedrockRuntimeClient *, const Model::InvokeModelRequest &, Model::InvokeModelOutcome, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > InvokeModelResponseReceivedHandler
std::function< void(const BedrockRuntimeClient *, const Model::ApplyGuardrailRequest &, const Model::ApplyGuardrailOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ApplyGuardrailResponseReceivedHandler
std::function< void(const BedrockRuntimeClient *, const Model::ConverseRequest &, const Model::ConverseOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ConverseResponseReceivedHandler
std::function< void(const BedrockRuntimeClient *, const Model::ConverseStreamRequest &, const Model::ConverseStreamOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ConverseStreamResponseReceivedHandler
std::function< void(const BedrockRuntimeClient *, const Model::InvokeModelWithResponseStreamRequest &, const Model::InvokeModelWithResponseStreamOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > InvokeModelWithResponseStreamResponseReceivedHandler
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String