Skip to content

InferenceConfiguration

Source code in docs_src/capo_bedrock_agent_runtime/types/inference_configuration.py
class InferenceConfiguration(TypedDict, closed=True):
    temperature: NotRequired["capo_bedrock_agent_runtime.types.temperature.Temperature"]
    """<p>The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options.</p>"""
    top_p: NotRequired["capo_bedrock_agent_runtime.types.top_p.TopP"]
    """<p>While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for <code>Top P</code> determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set <code>topP</code> to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens.</p>"""
    top_k: NotRequired["capo_bedrock_agent_runtime.types.top_k.TopK"]
    """<p>While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for <code>topK</code> is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set <code>topK</code> to 50, the model selects the next token from among the top 50 most likely choices.</p>"""
    maximum_length: NotRequired[
        "capo_bedrock_agent_runtime.types.maximum_length.MaximumLength"
    ]
    """<p>The maximum number of tokens allowed in the generated response.</p>"""
    stop_sequences: NotRequired[
        "capo_bedrock_agent_runtime.types.stop_sequences.StopSequences"
    ]
    """<p>A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response.</p>"""

maximum_length instance-attribute

maximum_length: NotRequired[MaximumLength]

The maximum number of tokens allowed in the generated response.

stop_sequences instance-attribute

stop_sequences: NotRequired[StopSequences]

A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response.

temperature instance-attribute

temperature: NotRequired[Temperature]

The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options.

top_k instance-attribute

top_k: NotRequired[TopK]

While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for topK is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topK to 50, the model selects the next token from among the top 50 most likely choices.

top_p instance-attribute

top_p: NotRequired[TopP]

While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for Top P determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topP to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens.