Skip to content

RetrieveAndGenerateStreamRequest

Source code in docs_src/capo_bedrock_agent_runtime/types/retrieve_and_generate_stream_request.py
class RetrieveAndGenerateStreamRequest(TypedDict, closed=True):
    session_id: NotRequired["capo_bedrock_agent_runtime.types.session_id.SessionId"]
    """<p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p>"""
    input: "capo_bedrock_agent_runtime.types.retrieve_and_generate_input.RetrieveAndGenerateInput"
    """<p>Contains the query to be made to the knowledge base.</p>"""
    retrieve_and_generate_configuration: NotRequired[
        "capo_bedrock_agent_runtime.types.retrieve_and_generate_configuration.RetrieveAndGenerateConfiguration"
    ]
    """<p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>"""
    session_configuration: NotRequired[
        "capo_bedrock_agent_runtime.types.retrieve_and_generate_session_configuration.RetrieveAndGenerateSessionConfiguration"
    ]
    """<p>Contains details about the session with the knowledge base.</p>"""
    user_context: NotRequired[
        "capo_bedrock_agent_runtime.types.user_context.UserContext"
    ]
    """<p>Contains information about the user making the request. This is used for access control filtering to ensure that retrieval results only include documents the user is authorized to access.</p>"""

input instance-attribute

Contains the query to be made to the knowledge base.

retrieve_and_generate_configuration instance-attribute

retrieve_and_generate_configuration: NotRequired[RetrieveAndGenerateConfiguration]

Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.

session_configuration instance-attribute

session_configuration: NotRequired[RetrieveAndGenerateSessionConfiguration]

Contains details about the session with the knowledge base.

session_id instance-attribute

session_id: NotRequired[SessionId]

The unique identifier of the session. When you first make a RetrieveAndGenerate request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the sessionId yourself.

user_context instance-attribute

user_context: NotRequired[UserContext]

Contains information about the user making the request. This is used for access control filtering to ensure that retrieval results only include documents the user is authorized to access.