1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`ConverseStream`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`model_id(impl Into<String>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::model_id) / [`set_model_id(Option<String>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::set_model_id):<br>required: **true**<br><p>The ID for the model.</p> <p>The <code>modelId</code> to provide depends on the type of model that you use:</p> <ul>  <li>   <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p></li>  <li>   <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p></li>  <li>   <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p></li> </ul><br>
    ///   - [`messages(Message)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::messages) / [`set_messages(Option<Vec::<Message>>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::set_messages):<br>required: **true**<br><p>The messages that you want to send to the model.</p><br>
    ///   - [`system(SystemContentBlock)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::system) / [`set_system(Option<Vec::<SystemContentBlock>>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::set_system):<br>required: **false**<br><p>A system prompt to send to the model.</p><br>
    ///   - [`inference_config(InferenceConfiguration)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::inference_config) / [`set_inference_config(Option<InferenceConfiguration>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::set_inference_config):<br>required: **false**<br><p>Inference parameters to pass to the model. <code>ConverseStream</code> supports a base set of inference parameters. If you need to pass additional parameters that the model supports, use the <code>additionalModelRequestFields</code> request field.</p><br>
    ///   - [`tool_config(ToolConfiguration)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::tool_config) / [`set_tool_config(Option<ToolConfiguration>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::set_tool_config):<br>required: **false**<br><p>Configuration information for the tools that the model can use when generating a response.</p><note>  <p>This field is only supported by Anthropic Claude 3 models.</p> </note><br>
    ///   - [`guardrail_config(GuardrailStreamConfiguration)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::guardrail_config) / [`set_guardrail_config(Option<GuardrailStreamConfiguration>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::set_guardrail_config):<br>required: **false**<br><p>Configuration information for a guardrail that you want to use in the request.</p><br>
    ///   - [`additional_model_request_fields(Document)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::additional_model_request_fields) / [`set_additional_model_request_fields(Option<Document>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::set_additional_model_request_fields):<br>required: **false**<br><p>Additional inference parameters that the model supports, beyond the base set of inference parameters that <code>ConverseStream</code> supports in the <code>inferenceConfig</code> field.</p><br>
    ///   - [`additional_model_response_field_paths(impl Into<String>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::additional_model_response_field_paths) / [`set_additional_model_response_field_paths(Option<Vec::<String>>)`](crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::set_additional_model_response_field_paths):<br>required: **false**<br><p>Additional model parameters field paths to return in the response. <code>ConverseStream</code> returns the requested fields as a JSON Pointer object in the <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p> <p><code>\[ "/stop_sequence" \]</code></p> <p>For information about the JSON Pointer syntax, see the <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p> <p><code>ConverseStream</code> rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored by <code>ConverseStream</code>.</p><br>
    /// - On success, responds with [`ConverseStreamOutput`](crate::operation::converse_stream::ConverseStreamOutput) with field(s):
    ///   - [`stream(EventReceiver<ConverseStreamOutput, ConverseStreamOutputError>)`](crate::operation::converse_stream::ConverseStreamOutput::stream): <p>The output stream that the model generated.</p>
    /// - On failure, responds with [`SdkError<ConverseStreamError>`](crate::operation::converse_stream::ConverseStreamError)
    pub fn converse_stream(&self) -> crate::operation::converse_stream::builders::ConverseStreamFluentBuilder {
        crate::operation::converse_stream::builders::ConverseStreamFluentBuilder::new(self.handle.clone())
    }
}