aws_sdk_bedrockagentruntime/operation/invoke_inline_agent/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::invoke_inline_agent::_invoke_inline_agent_output::InvokeInlineAgentOutputBuilder;
3
4pub use crate::operation::invoke_inline_agent::_invoke_inline_agent_input::InvokeInlineAgentInputBuilder;
5
6impl crate::operation::invoke_inline_agent::builders::InvokeInlineAgentInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::invoke_inline_agent::InvokeInlineAgentOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::invoke_inline_agent::InvokeInlineAgentError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.invoke_inline_agent();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `InvokeInlineAgent`.
24///
25/// <p>Invokes an inline Amazon Bedrock agent using the configurations you provide with the request.</p>
26/// <ul>
27/// <li>
28/// <p>Specify the following fields for security purposes.</p>
29/// <ul>
30/// <li>
31/// <p>(Optional) <code>customerEncryptionKeyArn</code> – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.</p></li>
32/// <li>
33/// <p>(Optional) <code>idleSessionTTLinSeconds</code> – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent <code>InvokeInlineAgent</code> request begins a new session.</p></li>
34/// </ul></li>
35/// <li>
36/// <p>To override the default prompt behavior for agent orchestration and to use advanced prompts, include a <code>promptOverrideConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html">Advanced prompts</a>.</p></li>
37/// <li>
38/// <p>The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.</p></li>
39/// </ul><note>
40/// </note>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct InvokeInlineAgentFluentBuilder {
43 handle: ::std::sync::Arc<crate::client::Handle>,
44 inner: crate::operation::invoke_inline_agent::builders::InvokeInlineAgentInputBuilder,
45 config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48 crate::client::customize::internal::CustomizableSend<
49 crate::operation::invoke_inline_agent::InvokeInlineAgentOutput,
50 crate::operation::invoke_inline_agent::InvokeInlineAgentError,
51 > for InvokeInlineAgentFluentBuilder
52{
53 fn send(
54 self,
55 config_override: crate::config::Builder,
56 ) -> crate::client::customize::internal::BoxFuture<
57 crate::client::customize::internal::SendResult<
58 crate::operation::invoke_inline_agent::InvokeInlineAgentOutput,
59 crate::operation::invoke_inline_agent::InvokeInlineAgentError,
60 >,
61 > {
62 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63 }
64}
65impl InvokeInlineAgentFluentBuilder {
66 /// Creates a new `InvokeInlineAgentFluentBuilder`.
67 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
68 Self {
69 handle,
70 inner: ::std::default::Default::default(),
71 config_override: ::std::option::Option::None,
72 }
73 }
74 /// Access the InvokeInlineAgent as a reference.
75 pub fn as_input(&self) -> &crate::operation::invoke_inline_agent::builders::InvokeInlineAgentInputBuilder {
76 &self.inner
77 }
78 /// Sends the request and returns the response.
79 ///
80 /// If an error occurs, an `SdkError` will be returned with additional details that
81 /// can be matched against.
82 ///
83 /// By default, any retryable failures will be retried twice. Retry behavior
84 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
85 /// set when configuring the client.
86 pub async fn send(
87 self,
88 ) -> ::std::result::Result<
89 crate::operation::invoke_inline_agent::InvokeInlineAgentOutput,
90 ::aws_smithy_runtime_api::client::result::SdkError<
91 crate::operation::invoke_inline_agent::InvokeInlineAgentError,
92 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
93 >,
94 > {
95 let input = self
96 .inner
97 .build()
98 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
99 let runtime_plugins = crate::operation::invoke_inline_agent::InvokeInlineAgent::operation_runtime_plugins(
100 self.handle.runtime_plugins.clone(),
101 &self.handle.conf,
102 self.config_override,
103 );
104 let mut output = crate::operation::invoke_inline_agent::InvokeInlineAgent::orchestrate(&runtime_plugins, input).await?;
105
106 // Converts any error encountered beyond this point into an `SdkError` response error
107 // with an `HttpResponse`. However, since we have already exited the `orchestrate`
108 // function, the original `HttpResponse` is no longer available and cannot be restored.
109 // This means that header information from the original response has been lost.
110 //
111 // Note that the response body would have been consumed by the deserializer
112 // regardless, even if the initial message was hypothetically processed during
113 // the orchestrator's deserialization phase but later resulted in an error.
114 fn response_error(
115 err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
116 ) -> ::aws_smithy_runtime_api::client::result::SdkError<
117 crate::operation::invoke_inline_agent::InvokeInlineAgentError,
118 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
119 > {
120 ::aws_smithy_runtime_api::client::result::SdkError::response_error(
121 err,
122 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
123 ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
124 ::aws_smithy_types::body::SdkBody::empty(),
125 ),
126 )
127 }
128
129 let message = output.completion.try_recv_initial_response().await.map_err(response_error)?;
130
131 match message {
132 ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
133 ::std::option::Option::None => ::std::result::Result::Ok(output),
134 }
135 }
136
137 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
138 pub fn customize(
139 self,
140 ) -> crate::client::customize::CustomizableOperation<
141 crate::operation::invoke_inline_agent::InvokeInlineAgentOutput,
142 crate::operation::invoke_inline_agent::InvokeInlineAgentError,
143 Self,
144 > {
145 crate::client::customize::CustomizableOperation::new(self)
146 }
147 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
148 self.set_config_override(::std::option::Option::Some(config_override.into()));
149 self
150 }
151
152 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
153 self.config_override = config_override;
154 self
155 }
156 /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent.</p>
157 pub fn customer_encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.inner = self.inner.customer_encryption_key_arn(input.into());
159 self
160 }
161 /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent.</p>
162 pub fn set_customer_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.inner = self.inner.set_customer_encryption_key_arn(input);
164 self
165 }
166 /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent.</p>
167 pub fn get_customer_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
168 self.inner.get_customer_encryption_key_arn()
169 }
170 /// <p>The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">model identifier (ID)</a> of the model to use for orchestration by the inline agent. For example, <code>meta.llama3-1-70b-instruct-v1:0</code>.</p>
171 pub fn foundation_model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.inner = self.inner.foundation_model(input.into());
173 self
174 }
175 /// <p>The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">model identifier (ID)</a> of the model to use for orchestration by the inline agent. For example, <code>meta.llama3-1-70b-instruct-v1:0</code>.</p>
176 pub fn set_foundation_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.inner = self.inner.set_foundation_model(input);
178 self
179 }
180 /// <p>The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">model identifier (ID)</a> of the model to use for orchestration by the inline agent. For example, <code>meta.llama3-1-70b-instruct-v1:0</code>.</p>
181 pub fn get_foundation_model(&self) -> &::std::option::Option<::std::string::String> {
182 self.inner.get_foundation_model()
183 }
184 /// <p>The instructions that tell the inline agent what it should do and how it should interact with users.</p>
185 pub fn instruction(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186 self.inner = self.inner.instruction(input.into());
187 self
188 }
189 /// <p>The instructions that tell the inline agent what it should do and how it should interact with users.</p>
190 pub fn set_instruction(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191 self.inner = self.inner.set_instruction(input);
192 self
193 }
194 /// <p>The instructions that tell the inline agent what it should do and how it should interact with users.</p>
195 pub fn get_instruction(&self) -> &::std::option::Option<::std::string::String> {
196 self.inner.get_instruction()
197 }
198 /// <p>The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent <code>InvokeInlineAgent</code> request begins a new session.</p>
199 /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.</p>
200 pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
201 self.inner = self.inner.idle_session_ttl_in_seconds(input);
202 self
203 }
204 /// <p>The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent <code>InvokeInlineAgent</code> request begins a new session.</p>
205 /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.</p>
206 pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
207 self.inner = self.inner.set_idle_session_ttl_in_seconds(input);
208 self
209 }
210 /// <p>The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent <code>InvokeInlineAgent</code> request begins a new session.</p>
211 /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.</p>
212 pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
213 self.inner.get_idle_session_ttl_in_seconds()
214 }
215 ///
216 /// Appends an item to `actionGroups`.
217 ///
218 /// To override the contents of this collection use [`set_action_groups`](Self::set_action_groups).
219 ///
220 /// <p>A list of action groups with each action group defining the action the inline agent needs to carry out.</p>
221 pub fn action_groups(mut self, input: crate::types::AgentActionGroup) -> Self {
222 self.inner = self.inner.action_groups(input);
223 self
224 }
225 /// <p>A list of action groups with each action group defining the action the inline agent needs to carry out.</p>
226 pub fn set_action_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AgentActionGroup>>) -> Self {
227 self.inner = self.inner.set_action_groups(input);
228 self
229 }
230 /// <p>A list of action groups with each action group defining the action the inline agent needs to carry out.</p>
231 pub fn get_action_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AgentActionGroup>> {
232 self.inner.get_action_groups()
233 }
234 ///
235 /// Appends an item to `knowledgeBases`.
236 ///
237 /// To override the contents of this collection use [`set_knowledge_bases`](Self::set_knowledge_bases).
238 ///
239 /// <p>Contains information of the knowledge bases to associate with.</p>
240 pub fn knowledge_bases(mut self, input: crate::types::KnowledgeBase) -> Self {
241 self.inner = self.inner.knowledge_bases(input);
242 self
243 }
244 /// <p>Contains information of the knowledge bases to associate with.</p>
245 pub fn set_knowledge_bases(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KnowledgeBase>>) -> Self {
246 self.inner = self.inner.set_knowledge_bases(input);
247 self
248 }
249 /// <p>Contains information of the knowledge bases to associate with.</p>
250 pub fn get_knowledge_bases(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KnowledgeBase>> {
251 self.inner.get_knowledge_bases()
252 }
253 /// <p>The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html">guardrails</a> to assign to the inline agent.</p>
254 pub fn guardrail_configuration(mut self, input: crate::types::GuardrailConfigurationWithArn) -> Self {
255 self.inner = self.inner.guardrail_configuration(input);
256 self
257 }
258 /// <p>The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html">guardrails</a> to assign to the inline agent.</p>
259 pub fn set_guardrail_configuration(mut self, input: ::std::option::Option<crate::types::GuardrailConfigurationWithArn>) -> Self {
260 self.inner = self.inner.set_guardrail_configuration(input);
261 self
262 }
263 /// <p>The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html">guardrails</a> to assign to the inline agent.</p>
264 pub fn get_guardrail_configuration(&self) -> &::std::option::Option<crate::types::GuardrailConfigurationWithArn> {
265 self.inner.get_guardrail_configuration()
266 }
267 /// <p>Configurations for advanced prompts used to override the default prompts to enhance the accuracy of the inline agent.</p>
268 pub fn prompt_override_configuration(mut self, input: crate::types::PromptOverrideConfiguration) -> Self {
269 self.inner = self.inner.prompt_override_configuration(input);
270 self
271 }
272 /// <p>Configurations for advanced prompts used to override the default prompts to enhance the accuracy of the inline agent.</p>
273 pub fn set_prompt_override_configuration(mut self, input: ::std::option::Option<crate::types::PromptOverrideConfiguration>) -> Self {
274 self.inner = self.inner.set_prompt_override_configuration(input);
275 self
276 }
277 /// <p>Configurations for advanced prompts used to override the default prompts to enhance the accuracy of the inline agent.</p>
278 pub fn get_prompt_override_configuration(&self) -> &::std::option::Option<crate::types::PromptOverrideConfiguration> {
279 self.inner.get_prompt_override_configuration()
280 }
281 /// <p>Defines how the inline collaborator agent handles information across multiple collaborator agents to coordinate a final response. The inline collaborator agent can also be the supervisor.</p>
282 pub fn agent_collaboration(mut self, input: crate::types::AgentCollaboration) -> Self {
283 self.inner = self.inner.agent_collaboration(input);
284 self
285 }
286 /// <p>Defines how the inline collaborator agent handles information across multiple collaborator agents to coordinate a final response. The inline collaborator agent can also be the supervisor.</p>
287 pub fn set_agent_collaboration(mut self, input: ::std::option::Option<crate::types::AgentCollaboration>) -> Self {
288 self.inner = self.inner.set_agent_collaboration(input);
289 self
290 }
291 /// <p>Defines how the inline collaborator agent handles information across multiple collaborator agents to coordinate a final response. The inline collaborator agent can also be the supervisor.</p>
292 pub fn get_agent_collaboration(&self) -> &::std::option::Option<crate::types::AgentCollaboration> {
293 self.inner.get_agent_collaboration()
294 }
295 ///
296 /// Appends an item to `collaboratorConfigurations`.
297 ///
298 /// To override the contents of this collection use [`set_collaborator_configurations`](Self::set_collaborator_configurations).
299 ///
300 /// <p>Settings for an inline agent collaborator called with <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeInlineAgent.html">InvokeInlineAgent</a>.</p>
301 pub fn collaborator_configurations(mut self, input: crate::types::CollaboratorConfiguration) -> Self {
302 self.inner = self.inner.collaborator_configurations(input);
303 self
304 }
305 /// <p>Settings for an inline agent collaborator called with <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeInlineAgent.html">InvokeInlineAgent</a>.</p>
306 pub fn set_collaborator_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CollaboratorConfiguration>>) -> Self {
307 self.inner = self.inner.set_collaborator_configurations(input);
308 self
309 }
310 /// <p>Settings for an inline agent collaborator called with <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeInlineAgent.html">InvokeInlineAgent</a>.</p>
311 pub fn get_collaborator_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CollaboratorConfiguration>> {
312 self.inner.get_collaborator_configurations()
313 }
314 /// <p>The name for the agent.</p>
315 pub fn agent_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
316 self.inner = self.inner.agent_name(input.into());
317 self
318 }
319 /// <p>The name for the agent.</p>
320 pub fn set_agent_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
321 self.inner = self.inner.set_agent_name(input);
322 self
323 }
324 /// <p>The name for the agent.</p>
325 pub fn get_agent_name(&self) -> &::std::option::Option<::std::string::String> {
326 self.inner.get_agent_name()
327 }
328 /// <p>The unique identifier of the session. Use the same value across requests to continue the same conversation.</p>
329 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
330 self.inner = self.inner.session_id(input.into());
331 self
332 }
333 /// <p>The unique identifier of the session. Use the same value across requests to continue the same conversation.</p>
334 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
335 self.inner = self.inner.set_session_id(input);
336 self
337 }
338 /// <p>The unique identifier of the session. Use the same value across requests to continue the same conversation.</p>
339 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
340 self.inner.get_session_id()
341 }
342 /// <p>Specifies whether to end the session with the inline agent or not.</p>
343 pub fn end_session(mut self, input: bool) -> Self {
344 self.inner = self.inner.end_session(input);
345 self
346 }
347 /// <p>Specifies whether to end the session with the inline agent or not.</p>
348 pub fn set_end_session(mut self, input: ::std::option::Option<bool>) -> Self {
349 self.inner = self.inner.set_end_session(input);
350 self
351 }
352 /// <p>Specifies whether to end the session with the inline agent or not.</p>
353 pub fn get_end_session(&self) -> &::std::option::Option<bool> {
354 self.inner.get_end_session()
355 }
356 /// <p>Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/trace-events.html">Using trace</a>.</p>
357 pub fn enable_trace(mut self, input: bool) -> Self {
358 self.inner = self.inner.enable_trace(input);
359 self
360 }
361 /// <p>Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/trace-events.html">Using trace</a>.</p>
362 pub fn set_enable_trace(mut self, input: ::std::option::Option<bool>) -> Self {
363 self.inner = self.inner.set_enable_trace(input);
364 self
365 }
366 /// <p>Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/trace-events.html">Using trace</a>.</p>
367 pub fn get_enable_trace(&self) -> &::std::option::Option<bool> {
368 self.inner.get_enable_trace()
369 }
370 /// <p>The prompt text to send to the agent.</p><note>
371 /// <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
372 /// </note>
373 pub fn input_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
374 self.inner = self.inner.input_text(input.into());
375 self
376 }
377 /// <p>The prompt text to send to the agent.</p><note>
378 /// <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
379 /// </note>
380 pub fn set_input_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
381 self.inner = self.inner.set_input_text(input);
382 self
383 }
384 /// <p>The prompt text to send to the agent.</p><note>
385 /// <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
386 /// </note>
387 pub fn get_input_text(&self) -> &::std::option::Option<::std::string::String> {
388 self.inner.get_input_text()
389 }
390 /// <p>Specifies the configurations for streaming.</p><note>
391 /// <p>To use agent streaming, you need permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>
392 /// </note>
393 pub fn streaming_configurations(mut self, input: crate::types::StreamingConfigurations) -> Self {
394 self.inner = self.inner.streaming_configurations(input);
395 self
396 }
397 /// <p>Specifies the configurations for streaming.</p><note>
398 /// <p>To use agent streaming, you need permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>
399 /// </note>
400 pub fn set_streaming_configurations(mut self, input: ::std::option::Option<crate::types::StreamingConfigurations>) -> Self {
401 self.inner = self.inner.set_streaming_configurations(input);
402 self
403 }
404 /// <p>Specifies the configurations for streaming.</p><note>
405 /// <p>To use agent streaming, you need permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>
406 /// </note>
407 pub fn get_streaming_configurations(&self) -> &::std::option::Option<crate::types::StreamingConfigurations> {
408 self.inner.get_streaming_configurations()
409 }
410 /// <p>Specifies parameters that control how the service populates the agent prompt for an <code>InvokeInlineAgent</code> request. You can control which aspects of previous invocations in the same agent session the service uses to populate the agent prompt. This gives you more granular control over the contextual history that is used to process the current request.</p>
411 pub fn prompt_creation_configurations(mut self, input: crate::types::PromptCreationConfigurations) -> Self {
412 self.inner = self.inner.prompt_creation_configurations(input);
413 self
414 }
415 /// <p>Specifies parameters that control how the service populates the agent prompt for an <code>InvokeInlineAgent</code> request. You can control which aspects of previous invocations in the same agent session the service uses to populate the agent prompt. This gives you more granular control over the contextual history that is used to process the current request.</p>
416 pub fn set_prompt_creation_configurations(mut self, input: ::std::option::Option<crate::types::PromptCreationConfigurations>) -> Self {
417 self.inner = self.inner.set_prompt_creation_configurations(input);
418 self
419 }
420 /// <p>Specifies parameters that control how the service populates the agent prompt for an <code>InvokeInlineAgent</code> request. You can control which aspects of previous invocations in the same agent session the service uses to populate the agent prompt. This gives you more granular control over the contextual history that is used to process the current request.</p>
421 pub fn get_prompt_creation_configurations(&self) -> &::std::option::Option<crate::types::PromptCreationConfigurations> {
422 self.inner.get_prompt_creation_configurations()
423 }
424 /// <p>Parameters that specify the various attributes of a sessions. You can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p><note>
425 /// <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
426 /// </note>
427 pub fn inline_session_state(mut self, input: crate::types::InlineSessionState) -> Self {
428 self.inner = self.inner.inline_session_state(input);
429 self
430 }
431 /// <p>Parameters that specify the various attributes of a sessions. You can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p><note>
432 /// <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
433 /// </note>
434 pub fn set_inline_session_state(mut self, input: ::std::option::Option<crate::types::InlineSessionState>) -> Self {
435 self.inner = self.inner.set_inline_session_state(input);
436 self
437 }
438 /// <p>Parameters that specify the various attributes of a sessions. You can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p><note>
439 /// <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
440 /// </note>
441 pub fn get_inline_session_state(&self) -> &::std::option::Option<crate::types::InlineSessionState> {
442 self.inner.get_inline_session_state()
443 }
444 ///
445 /// Appends an item to `collaborators`.
446 ///
447 /// To override the contents of this collection use [`set_collaborators`](Self::set_collaborators).
448 ///
449 /// <p>List of collaborator inline agents.</p>
450 pub fn collaborators(mut self, input: crate::types::Collaborator) -> Self {
451 self.inner = self.inner.collaborators(input);
452 self
453 }
454 /// <p>List of collaborator inline agents.</p>
455 pub fn set_collaborators(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Collaborator>>) -> Self {
456 self.inner = self.inner.set_collaborators(input);
457 self
458 }
459 /// <p>List of collaborator inline agents.</p>
460 pub fn get_collaborators(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Collaborator>> {
461 self.inner.get_collaborators()
462 }
463 /// <p>Model settings for the request.</p>
464 pub fn bedrock_model_configurations(mut self, input: crate::types::InlineBedrockModelConfigurations) -> Self {
465 self.inner = self.inner.bedrock_model_configurations(input);
466 self
467 }
468 /// <p>Model settings for the request.</p>
469 pub fn set_bedrock_model_configurations(mut self, input: ::std::option::Option<crate::types::InlineBedrockModelConfigurations>) -> Self {
470 self.inner = self.inner.set_bedrock_model_configurations(input);
471 self
472 }
473 /// <p>Model settings for the request.</p>
474 pub fn get_bedrock_model_configurations(&self) -> &::std::option::Option<crate::types::InlineBedrockModelConfigurations> {
475 self.inner.get_bedrock_model_configurations()
476 }
477 /// <p>Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.</p>
478 pub fn orchestration_type(mut self, input: crate::types::OrchestrationType) -> Self {
479 self.inner = self.inner.orchestration_type(input);
480 self
481 }
482 /// <p>Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.</p>
483 pub fn set_orchestration_type(mut self, input: ::std::option::Option<crate::types::OrchestrationType>) -> Self {
484 self.inner = self.inner.set_orchestration_type(input);
485 self
486 }
487 /// <p>Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.</p>
488 pub fn get_orchestration_type(&self) -> &::std::option::Option<crate::types::OrchestrationType> {
489 self.inner.get_orchestration_type()
490 }
491 /// <p>Contains details of the custom orchestration configured for the agent.</p>
492 pub fn custom_orchestration(mut self, input: crate::types::CustomOrchestration) -> Self {
493 self.inner = self.inner.custom_orchestration(input);
494 self
495 }
496 /// <p>Contains details of the custom orchestration configured for the agent.</p>
497 pub fn set_custom_orchestration(mut self, input: ::std::option::Option<crate::types::CustomOrchestration>) -> Self {
498 self.inner = self.inner.set_custom_orchestration(input);
499 self
500 }
501 /// <p>Contains details of the custom orchestration configured for the agent.</p>
502 pub fn get_custom_orchestration(&self) -> &::std::option::Option<crate::types::CustomOrchestration> {
503 self.inner.get_custom_orchestration()
504 }
505}