Skip to content

TextInferenceConfig

Source code in docs_src/capo_bedrock_agent_runtime/types/text_inference_config.py
class TextInferenceConfig(TypedDict, closed=True):
    temperature: NotRequired["capo_bedrock_agent_runtime.types.temperature.Temperature"]
    """<p> Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable. </p>"""
    top_p: NotRequired["capo_bedrock_agent_runtime.types.top_p.TopP"]
    """<p> A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token. </p>"""
    max_tokens: NotRequired["capo_bedrock_agent_runtime.types.max_tokens.MaxTokens"]
    """<p>The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitary values, for actual values consult the limits defined by your specific model.</p>"""
    stop_sequences: NotRequired[
        "capo_bedrock_agent_runtime.types.rag_stop_sequences.RAGStopSequences"
    ]
    """<p>A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitary values, for actual values consult the limits defined by your specific model.</p>"""

max_tokens instance-attribute

max_tokens: NotRequired[MaxTokens]

The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitary values, for actual values consult the limits defined by your specific model.

stop_sequences instance-attribute

stop_sequences: NotRequired[RAGStopSequences]

A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitary values, for actual values consult the limits defined by your specific model.

temperature instance-attribute

temperature: NotRequired[Temperature]

Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable.

top_p instance-attribute

top_p: NotRequired[TopP]

A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token.