Skip to content

GenerationConfiguration

Source code in docs_src/capo_bedrock_agent_runtime/types/generation_configuration.py
class GenerationConfiguration(TypedDict, closed=True):
    prompt_template: NotRequired[
        "capo_bedrock_agent_runtime.types.prompt_template.PromptTemplate"
    ]
    """<p>Contains the template for the prompt that's sent to the model for response generation. Generation prompts must include the <code>$search_results$</code> variable. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html">Use placeholder variables</a> in the user guide.</p>"""
    guardrail_configuration: NotRequired[
        "capo_bedrock_agent_runtime.types.guardrail_configuration.GuardrailConfiguration"
    ]
    """<p>The configuration details for the guardrail.</p>"""
    inference_config: NotRequired[
        "capo_bedrock_agent_runtime.types.inference_config.InferenceConfig"
    ]
    """<p> Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source. </p>"""
    additional_model_request_fields: NotRequired[
        "capo_bedrock_agent_runtime.types.additional_model_request_fields.AdditionalModelRequestFields"
    ]
    """<p> Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows users to provide custom model parameters specific to the language model being used. </p>"""
    performance_config: NotRequired[
        "capo_bedrock_agent_runtime.types.performance_configuration.PerformanceConfiguration"
    ]
    """<p>The latency configuration for the model.</p>"""

additional_model_request_fields instance-attribute

additional_model_request_fields: NotRequired[AdditionalModelRequestFields]

Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows users to provide custom model parameters specific to the language model being used.

guardrail_configuration instance-attribute

guardrail_configuration: NotRequired[GuardrailConfiguration]

The configuration details for the guardrail.

inference_config instance-attribute

inference_config: NotRequired[InferenceConfig]

Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source.

performance_config instance-attribute

performance_config: NotRequired[PerformanceConfiguration]

The latency configuration for the model.

prompt_template instance-attribute

prompt_template: NotRequired[PromptTemplate]

Contains the template for the prompt that's sent to the model for response generation. Generation prompts must include the $search_results$ variable. For more information, see Use placeholder variables in the user guide.