OnnxGenAIPromptExecutionSettings Class
OnnxGenAI prompt execution settings.
Initialize the prompt execution settings.
Constructor
OnnxGenAIPromptExecutionSettings(service_id: str | None = None, *, extension_data: dict[str, Any] = None, function_choice_behavior: FunctionChoiceBehavior | None = None, diversity_penalty: Annotated[float | None, Ge(ge=0.0), Le(le=1.0)] = None, do_sample: bool = False, early_stopping: bool = True, length_penalty: Annotated[float | None, Ge(ge=0.0), Le(le=1.0)] = None, max_length: Annotated[int, Gt(gt=0)] = 3072, min_length: Annotated[int | None, Gt(gt=0)] = None, no_repeat_ngram_size: int = 0, num_beams: Annotated[int | None, Gt(gt=0)] = None, num_return_sequences: Annotated[int | None, Gt(gt=0)] = None, past_present_share_buffer: int = True, repetition_penalty: Annotated[float | None, Ge(ge=0.0), Le(le=1.0)] = None, temperature: Annotated[float | None, Ge(ge=0.0), Le(le=2.0)] = None, top_k: Annotated[int | None, Gt(gt=0)] = None, top_p: Annotated[float | None, Ge(ge=0.0), Le(le=1.0)] = None)
Parameters
Name | Description |
---|---|
service_id
|
The service ID to use for the request. Default value: None
|
kwargs
Required
|
Additional keyword arguments, these are attempted to parse into the keys of the specific prompt execution settings. |
Keyword-Only Parameters
Name | Description |
---|---|
extension_data
Required
|
|
function_choice_behavior
Required
|
|
diversity_penalty
Required
|
|
do_sample
Required
|
|
early_stopping
|
Default value: True
|
length_penalty
Required
|
|
max_length
|
Default value: 3072
|
min_length
Required
|
|
no_repeat_ngram_size
Required
|
|
num_beams
Required
|
|
num_return_sequences
Required
|
|
past_present_share_buffer
|
Default value: True
|
repetition_penalty
Required
|
|
temperature
Required
|
|
top_k
Required
|
|
top_p
Required
|
|
Attributes
diversity_penalty
diversity_penalty: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0.0), Le(le=1.0)])]
do_sample
do_sample: bool
early_stopping
early_stopping: bool
length_penalty
length_penalty: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0.0), Le(le=1.0)])]
max_length
max_length: Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]
min_length
min_length: Annotated[int | None, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]
no_repeat_ngram_size
no_repeat_ngram_size: int
num_beams
num_beams: Annotated[int | None, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]
num_return_sequences
num_return_sequences: Annotated[int | None, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]
past_present_share_buffer
past_present_share_buffer: int
repetition_penalty
repetition_penalty: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0.0), Le(le=1.0)])]
temperature
temperature: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0.0), Le(le=2.0)])]
top_k
top_k: Annotated[int | None, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]
top_p
top_p: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0.0), Le(le=1.0)])]