1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | pub use crate::operation::converse_stream::_converse_stream_output::ConverseStreamOutputBuilder;
|
3 - |
|
4 2 | pub use crate::operation::converse_stream::_converse_stream_input::ConverseStreamInputBuilder;
|
5 3 |
|
4 + | pub use crate::operation::converse_stream::_converse_stream_output::ConverseStreamOutputBuilder;
|
5 + |
|
6 6 | impl crate::operation::converse_stream::builders::ConverseStreamInputBuilder {
|
7 7 | /// Sends a request with this input using the given client.
|
8 8 | pub async fn send_with(
|
9 9 | self,
|
10 10 | client: &crate::Client,
|
11 11 | ) -> ::std::result::Result<
|
12 12 | crate::operation::converse_stream::ConverseStreamOutput,
|
13 13 | ::aws_smithy_runtime_api::client::result::SdkError<
|
14 14 | crate::operation::converse_stream::ConverseStreamError,
|
15 15 | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
16 16 | >,
|
17 17 | > {
|
18 18 | let mut fluent_builder = client.converse_stream();
|
19 19 | fluent_builder.inner = self;
|
20 20 | fluent_builder.send().await
|
21 21 | }
|
22 22 | }
|
23 23 | /// Fluent builder constructing a request to `ConverseStream`.
|
24 24 | ///
|
25 25 | /// <p>Sends messages to the specified Amazon Bedrock model and returns the response in a stream. <code>ConverseStream</code> provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model.</p>
|
26 26 | /// <p>To find out if a model supports streaming, call <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html">GetFoundationModel</a> and check the <code>responseStreamingSupported</code> field in the response.</p><note>
|
27 27 | /// <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>ConverseStream</code>.</p>
|
28 28 | /// </note>
|
29 29 | /// <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p>
|
30 30 | /// <p>You can submit a prompt by including it in the <code>messages</code> field, specifying the <code>modelId</code> of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.</p>
|
31 31 | /// <p>You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the <code>promptVariables</code> field. You can append more messages to the prompt by using the <code>messages</code> field. If you use a prompt from Prompt management, you can't include the following fields in the request: <code>additionalModelRequestFields</code>, <code>inferenceConfig</code>, <code>system</code>, or <code>toolConfig</code>. Instead, these fields must be defined through Prompt management. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html">Use a prompt from Prompt management</a>.</p>
|
32 32 | /// <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i></p>
|
33 33 | /// <p>For example code, see <i>Conversation streaming example</i> in the <i>Amazon Bedrock User Guide</i>.</p>
|
34 34 | /// <p>This operation requires permission for the <code>bedrock:InvokeModelWithResponseStream</code> action.</p><important>
|
35 35 | /// <p>To deny all inference access to resources that you specify in the modelId field, you need to deny access to the <code>bedrock:InvokeModel</code> and <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies access to the resource through the base inference actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.</p>
|