Skip to content

RetrieveRequest

Source code in docs_src/capo_bedrock_agent_runtime/types/retrieve_request.py
class RetrieveRequest(TypedDict, closed=True):
    knowledge_base_id: "capo_bedrock_agent_runtime.types.knowledge_base_identifier.KnowledgeBaseIdentifier"
    """<p>The unique identifier of the knowledge base to query.</p>"""
    retrieval_query: (
        "capo_bedrock_agent_runtime.types.knowledge_base_query.KnowledgeBaseQuery"
    )
    """<p>Contains the query to send the knowledge base.</p>"""
    retrieval_configuration: NotRequired[
        "capo_bedrock_agent_runtime.types.knowledge_base_retrieval_configuration.KnowledgeBaseRetrievalConfiguration"
    ]
    """<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>"""
    guardrail_configuration: NotRequired[
        "capo_bedrock_agent_runtime.types.guardrail_configuration.GuardrailConfiguration"
    ]
    """<p>Guardrail settings.</p>"""
    next_token: NotRequired["capo_bedrock_agent_runtime.types.next_token.NextToken"]
    """<p>If there are more results than can fit in the response, the response returns a <code>nextToken</code>. Use this token in the <code>nextToken</code> field of another request to retrieve the next batch of results.</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>"""

guardrail_configuration instance-attribute

guardrail_configuration: NotRequired[GuardrailConfiguration]

Guardrail settings.

knowledge_base_id instance-attribute

knowledge_base_id: KnowledgeBaseIdentifier

The unique identifier of the knowledge base to query.

next_token instance-attribute

next_token: NotRequired[NextToken]

If there are more results than can fit in the response, the response returns a nextToken. Use this token in the nextToken field of another request to retrieve the next batch of results.

retrieval_configuration instance-attribute

retrieval_configuration: NotRequired[KnowledgeBaseRetrievalConfiguration]

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

retrieval_query instance-attribute

retrieval_query: KnowledgeBaseQuery

Contains the query to send the knowledge base.

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.