Skip to content

StreamingConfigurations

Source code in docs_src/capo_bedrock_agent_runtime/types/streaming_configurations.py
class StreamingConfigurations(TypedDict, closed=True):
    stream_final_response: "bool"
    """<p> Specifies whether to enable streaming for the final response. This is set to <code>false</code> by default. </p>"""
    apply_guardrail_interval: NotRequired["int"]
    """<p> The guardrail interval to apply as response is generated. By default, the guardrail interval is set to 50 characters. If a larger interval is specified, the response will be generated in larger chunks with fewer <code>ApplyGuardrail</code> calls. The following examples show the response generated for <i>Hello, I am an agent</i> input string.</p> <p> <b>Example response in chunks: Interval set to 3 characters</b> </p> <p> <code>'Hel', 'lo, ','I am', ' an', ' Age', 'nt'</code> </p> <p>Each chunk has at least 3 characters except for the last chunk</p> <p> <b>Example response in chunks: Interval set to 20 or more characters</b> </p> <p> <code>Hello, I am an Agent</code> </p>"""

apply_guardrail_interval instance-attribute

apply_guardrail_interval: NotRequired[int]

The guardrail interval to apply as response is generated. By default, the guardrail interval is set to 50 characters. If a larger interval is specified, the response will be generated in larger chunks with fewer ApplyGuardrail calls. The following examples show the response generated for Hello, I am an agent input string.

Example response in chunks: Interval set to 3 characters

'Hel', 'lo, ','I am', ' an', ' Age', 'nt'

Each chunk has at least 3 characters except for the last chunk

Example response in chunks: Interval set to 20 or more characters

Hello, I am an Agent

stream_final_response instance-attribute

stream_final_response: bool

Specifies whether to enable streaming for the final response. This is set to false by default.